You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
CKS add-node can pick an SSH port a live node uses after a node is removed #14797
CKS add-node picks the new node's SSH port from the node count, not from the ports in use. After removing an added node that is not the last one, the next add-node picks a port a live node still uses, and the add fails on a rule conflict.
In KubernetesClusterAddWorker.validateAndSetupNode:
On an isolated network the firewall rule create fails (The range specified, 2226-2226, conflicts with rule ...). On a VPC tier the PF rule is saved without a conflict check, so two PF rules share the port.
versions
4.22 and main (same code). Any CKS cluster that uses add-node / remove-node with external VMs.
The steps to reproduce the bug
Create a CKS cluster (1 control, 2 workers) on an isolated network.
addNodesToKubernetesCluster with VM A, then with VM B.
removeNodesFromKubernetesCluster with VM A.
addNodesToKubernetesCluster with VM C: it fails on port 2226.
What to do about it?
Pick the lowest port from 2222 up that no rule on the cluster's public IP is using, so a gap left by a removed node is reused and live nodes' ports are never taken. Existing nodes keep their ports.
Activity