I have created a small k8s managed cluster in DO. I have 2 nodes.
How many public IPs will I have ?
My nodes have their public IPs but are these available to be mapped for the cluster ?
I want to run 2 x coredns which 2 separate IPs for the name servers.
It’s quite confusing :-(
What External IPs will be exposed, is it something over than the node’s public IPs ?
Where can I view the public IP or IPs ?
I will be running traefik to route my normal website data etc which is going to be installed as an ingress controller - so I don’t require DO Load balancer component, as far as I am aware.
So … to cut a long story short :-)
I will run traefik as an ingress controller that will router my standard websites and other things - I don’t require more than 1 IP for this.
I want to run 2 x coredns, 1 on node1 and 1 on node2, these require their own IPs
Anybody lend a hand in explaining the above scenario, am I on the right track ?
Maybe its a simple case of running the coredns on each node in the cluster, exposing the port 53 and then I can use the public IPs of each node ?
I actually created some floating IPs that point to my 2 nodes, so these will always be the same IP weather I destroy nodes or what ever.
Thanks in advance
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Click below to sign up and get $200 of credit to try our products over 60 days!
Each node will have its own public IP. The control plane API will be managed for you but exposed via a URL made up of your cluster’s UUID.
These IP’s will change as nodes are upgraded and recycled. The IP’s of the nodes will change as they are replaced with new nodes. Floating IP’s will not re-attach to new nodes that replace them as the new nodes have no awareness of the nodes they are replacing.
To expose services that are running in the cluster I would recommend creating a LoadBalancer type service. You can find documentation on exposing a service via LB here: https://www.digitalocean.com/docs/kubernetes/how-to/add-load-balancers/
I would recommend exposing your traefik service as a DO LB. This LB would be a consistent public IP for your requests to use that would always route to Traefik. Then using ingress rules you can distribute traffic accordingly to your services.
Hope this helps!