HA in k8s cluster in case of node failure pointed by A record of domain

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?


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