2

I'm newer with kubernetes. I've installed minikube v1.5.2 in a virtualbox VM (ubuntu 19.10). I want to create a web server that I can access from the host and guest. However, I can't access it or expose an IP. Could you help me?

I've already enabled the ingress addons.

When I try list the ingress object there is no external IP and I recive this error message from ingress controller deployment:

2019/11/10 15:41:04 controller-haproxy.go:147 service does not exists
2019/11/10 15:41:09 controller.go:333: service  does not exists
2019/11/10 15:41:09 controller-haproxy.go:147 service  does not exists
2019/11/10 15:41:14 controller.go:333: service  does not exists
2019/11/10 15:41:14 controller-haproxy.go:147 service  does not exists

This is my code: https://pastebin.com/ysMPtyuV

r4mpz0
  • 43
  • 6

1 Answers1

0

Minikube introduced supporting of LoadBalancer via minikube tunnel.

When you are not using $ sudo minikube tunnel your LB service will be in pending state whole time.

You need to open another SSH window and run $ sudo minikube tunnel. You will receive output in one SSH like:

$ sudo minikube tunnel
Status:
        machine: minikube
        pid: 11549
        route: 10.96.0.0/12 -> 10.132.15.208
        minikube: Running
        services: [haproxy-ingress]
    errors: 
                minikube: no errors
                router: no errors
                loadbalancer emulator: no errors

In the second SSH you will be able to check that LB service obtain IP address.

minikube:~$ kubectl get svc -w
NAME              TYPE           CLUSTER-IP      EXTERNAL-IP   PORT(S)        AGE
app               ClusterIP      10.105.136.11   <none>        80/TCP         68s
haproxy-ingress   LoadBalancer   10.111.24.111   <pending>     80:31187/TCP   68s
kubernetes        ClusterIP      10.96.0.1       <none>        443/TCP        11d
haproxy-ingress   LoadBalancer   10.111.24.111   10.111.24.111   80:31187/TCP   80s

Please keep in mind that minikube tunnel session must be opened whole the time otherwise your LB will stop getting IP address.

You can check similar case with Kong using minikube LB.

Let me know if that helped you.

PjoterS
  • 12,841
  • 1
  • 22
  • 54
  • Hi @PjoterS.Thank you for your help. I tried it but it still not working. Now I have an External-IP but I cant access my pods from there. This is what I did: curl -I -H 'Host: web-aap.local' 'http://10.102.220.80' (ERROR: 503 Server Unavailable) e curl -I -H 'Host: web-aap.local' 'http://10.102.220.80:31993' (No route to host). How can I access it? – r4mpz0 Nov 13 '19 at 12:04
  • Please provide output of `$ minikube service haproxy-ingress` and when you will run `$ curl -i ` ? Also what `--vm-driver` are you using? – PjoterS Nov 18 '19 at 14:09
  • Hi, PjoterS. Sorry to answer too late. I chose to change to Kubernetes and Metallb. Your solution changed the External IP, so I will mark it as the correct answer. Thx!! – r4mpz0 Nov 28 '19 at 18:57