How can I fixe the external IP for a Kubernetes cluster

Hello,

I have install a configure a Kubernetes cluster with 3 nodes.
Each time when a deploy a service (a simple HTTP site + nginx), I receive a other external IP :

kubectl get services
NAME TYPE CLUSTER-IP EXTERNAL-IP > PORT(S) AGE
wwwww-site-service LoadBalancer 10.128.178.196 192.46.ZZZ.XX 80:30825/TCP 13s
kubernetes ClusterIP 10.128.0.1 <none> 443/TCP 3h27m</none>

Is this a stupid question but I don't know how or which external IP a Need to used in the DNS for the site ?
For each service I will receive an other external IP ? How can I manage this ?

Thanks you

JMS

1 Reply

Hey there JMS. Not a stupid question! You are correct that each individual worker node (the backend nodes) has their own IP, but they're not designed to be individually accessible over the internet. When setting up DNS, you'll want to use the NodeBalancer IP that's in front of the worker nodes.

When deploying a cluster with LKE, a NodeBalancer is deployed as well. This acts as a frontend for your cluster and is the "managed" part of the managed Kubernetes service (Linode Kubernetes Engine). To view your NodeBalancer's IP:

  • Click the NodeBalancers tab on the left of the Cloud Manager.
  • You'll see a NodeBalancer named as a long random string of characters. This should have an IPv4 listed.

*Pro tip from the LKE team: If you are planning on having more than one site on your cluster, you might want to look into setting up Ingress to help point external requests to different internal services. We have a guide on setting up an NGINX Ingress controller on LKE here:

How to Deploy NGINX Ingress on Linode Kubernetes Engine

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct