How to Properly Simulate Node Shutdown in Kubernetes with Kube-VIP?
Asked by
taciturn
I'm working on testing a High Availability setup using Kube-VIP to transfer the active control plane from one node to another. The suggestion was to shut down the Linux instance using a command, but we can't do that right now. Instead, we've tried stopping the kubelet and containerd services to mimic a shutdown, but that didn't lead to the expected movement of the Kube-VIP virtual node. The only method that seems to trigger the virtual IP move is by removing static API and control pods from one of the nodes, which demonstrates we have an HA cluster. Can anyone explain why stopping the services doesn't result in a proper shutdown simulation?
Answers
Instead of stopping services, you could delete the lease associated with Kube-VIP. This action will prompt a leader election, effectively simulating a failover scenario.
Reply to this answer
Stopping the kubelet and containerd services alone won't stop the containers running on your node, so they will continue to operate even when the services stop. If you're looking to simulate a shutdown, you would typically want to stop the actual containers. If you're testing with VM nodes, it would be much easier to just turn off the VM itself. But I totally get that you might not have that option right now.
Reply to this answer
Add your answer
Answers are reviewed before publication.
Related Discussions