0

I've got a question of "what if" kind

Suppose there is a Kubernetes cluster with 4 nodes and some domain which points to IP of node no 1 and web app using this domain having 1 pod per node. If node 1 will fail then in the current state of my knowledge the app will fail cause A record is pointing to that node which is broken

How it can be solved to maintain HA environment?

Jack
  • 1

2 Answers2

1

That is the problem that a Service is designed to solve, and if you are in a cloud environment (or otherwise have an operator that will provision something that looks like a load balancer), then type: LoadBalancer will provision a stable entrypoint from outside the cluster to inside the cluster, and then kubernetes will route around that Node failure.

Under the covers, type: LoadBalancer is just glue between type: NodePort and the load balancer, so even if you don't have a formal load balancer mechanism available to you, using type: NodePort and a copy of haproxy pointed at every Node in your cluster will go a long way toward addressing your risk

mdaniel
  • 2,671
0

Thanks mdaniel for clarification!

I've also found useful links to dive deeper

Is it possible to make redundancy on HAProxy server?

How to setup HAProxy with failover?

It's also a good idea to check out topics such as floating ip, keepalived, and if your vendor have api for changing destination of floating ip here on digitalocean you can check how-to https://www.digitalocean.com/community/tutorials/how-to-set-up-highly-available-haproxy-servers-with-keepalived-and-floating-ips-on-ubuntu-14-04

JackBack
  • 1
  • 3