why
Yesterday the company k8S cluster malfunctioned and a large number of PODS were expelled due to Keepalived brain fracture
Cluster nodes access apiserver via VIP
When Keepalived breaks,kubelet will not be able to access apiserver, causing the Controller-Manager to set the node state to not Ready, and then the Controller-Manager will expel the Pod from the node
There are two cases of eviction
If enable-taint-Manager is enabled, the pod will be expelled after 300 seconds
If enable-taint-manager is not enabled, the POD is directly expelled
The solution
Configure nginx on all nodes and fill in all apiserver IP addresses (for load balancing)