Kubernetes service showing External Ip '<pending>'. How can I enable it?

7/22/2018

Having trouble getting a wordpress Kubertenes service to listen on my machine so that I can access it with my web browser. It just says "External IP" is pending. I'm using the Kubertenes configuration from Docker Edge v18.06 on Mac, with advanced Kube config enabled (not swarm).

Following this tutorial FROM: https://www.youtube.com/watch?time_continue=65&v=jWupQjdjLN0

And using .yaml config files from https://github.com/kubernetes/examples/tree/master/mysql-wordpress-pd

MACPRO:mysql-wordpress-pd me$ kubectl get services
NAME              TYPE           CLUSTER-IP      EXTERNAL-IP   PORT(S)        AGE
kubernetes        ClusterIP      10.96.0.1       <none>        443/TCP        48m
wordpress         LoadBalancer   10.99.205.222   <pending>     80:30875/TCP   19m
wordpress-mysql   ClusterIP      None            <none>        3306/TCP       19m

The commands to get things running, to see for yourself:

kubectl create -f local-volumes.yaml
kubectl create secret generic mysql-pass --from-literal=password=DockerCon
kubectl create -f mysql-deployment.yaml
kubectl create -f wordpress-deployment.yaml 
kubectl get pods
kubectl get services

Start admin console to see more detailed config in your web browser:

kubectl create -f https://raw.githubusercontent.com/kubernetes/dashboard/master/src/deploy/recommended/kubernetes-dashboard.yaml
kubectl proxy

I'm hoping someone can clarify things for me here. Thank you.

-- djangofan
kubernetes

1 Answer

7/23/2018

For Docker for Mac, you should use your host's DNS name or IP address to access exposed services. The "external IP" field will never fill in here. (If you were in an environment like AWS or GCP where a LoadBalancer Kubernetes Service creates a cloud-hosted load balancer, the cloud provider integration would provide the load balancer's IP address here, but that doesn't make sense for single-host solutions.)

Note that I've had some trouble figuring out which port is involved; answers to that issue suggest you need to use the service port (80) but you might need to try other things.

-- David Maze
Source: StackOverflow