How to Properly Simulate Node Shutdown in Kubernetes with Kube-VIP?

0
4
Asked By CuriousCat123 On

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?

2 Answers

Answered By TechWizard99 On

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.

Answered By NetworkNinja45 On

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.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.