Whenever I expose a Kubernetes Service as a Load Balancer the external-IP is in forever pending
state.
So, I am not able to access the dgraph ratle
through my browser.
I needed to expose my Service through NodePort so that I can access it with IP:node-port
.
Here I created a NodePort Service for my dgraph ratle
public. I can curl
IP:node-port
and able to get the result but I cannot access it in my web browser. I'm using Kubernetes on Digital Ocean Kubernetes version v1.12
.
Help me with:
Get pending external-IP or
Exposing the container in public or
What am I missing?
You can't reach private IP addresses over the Internet, so you need to create a Load Balancer in front of your Kubernetes cluster, or some kind of VPN into your cluster.
Kubernetes default cloud controller manager doesn't support DigitalOcean. You can create a Load Balancer for Kubernetes cluster nodes manually, or you need to install an additional cloud-controller-manager for DigitalOcean cloud as it is mentioned in the manual:
- Clone the git repo:
$ git clone https://github.com/digitalocean/digitalocean-cloud-controller-manager.git
- To run digitalocean-cloud-controller-manager, you need a DigitalOcean personal access token. If you are already logged in, you can create one here. Ensure the token you create has both read and write access.
- Once you have a personal access token, create a Kubernetes Secret as a way for the cloud controller manager to access your token. (using script, or manually)
- Deploy appropriate version of cloud-controller-manager:
$ kubectl apply -f releases/v0.1.10.yml
deployment "digitalocean-cloud-controller-manager" created
NOTE: the deployments in releases/ are meant to serve as an example. They will work in a majority of cases but may not work out of the box for your cluster.
Cloud Controller Manager current version is: v0.1.10. This means that the project is still under active development and may not be production ready. The plugin will be bumped to v1.0.0 once the DigitalOcean Kubernetes product is released.
Here you can find examples: