Agent Node should not rely on specific master Node

Ref: https://github.com/harvester/harvester/issues/1521

Verify Items

  • Agent Node should keep connection when any master Node is down

Case: Agent Node’s connecting status

  1. Install Harvester with 4 nodes which joining node MUST join by VIP (point server-url to use VIP)
  2. Make sure all nodes are ready
    1. Login to dashboard, check host state become Active
    2. SSH to the 1st node, run command kubectl get node to check all STATUS should be Ready
  3. SSH to agent nodes which ROLES IS <none> in Step 2i’s output
    • Output should contains VIP in the server URL, by run command cat /etc/rancher/rke2/config.yaml.d/90-harvester-vip.yaml
    • Output should contain the line server: https://127.0.0.1:6443, by run command cat /var/lib/rancher/rke2/agent/kubelet.kubeconfig
    • Output should contain the line server: https://127.0.0.1:6443, by run command cat /var/lib/rancher/rke2/agent/kubeproxy.kubeconfig
  4. SSH to server nodes which ROLES contains control-plane in Step 2i’s output
    • Check file should not exist in the path /etc/rancher/rke2/config.yaml.d/90-harvester-vip.yaml
  5. Shut down a server node, check following things
    • Host State should not be Active in dashboard
    • Node STATUS should be NotReady in the command output of kubectl get node
    • STATUS of agent nodes should be Ready in the command output of kubectl get node
  6. Power on the server node, wait until it back to cluster
  7. repeat Step 5-6 for other server nodes