Skip to content

CKS: a node removed with removeNodesFromKubernetesCluster never rejoins when added again #14795

Open

Description

@bhouse-nexthop

problem

A VM removed from a CKS cluster and added back never rejoins.

step result
removeNodesFromKubernetesCluster on an external node node drained, deleted, kubeadm reset -f on the VM
addNodesToKubernetesCluster with the same VM user data replaced, VM rebooted
setup-kube-system / deploy-kube-system on boot exit with Already provisioned! because /home/cloud/success is still there
add job waits for a Ready node until cloud.kubernetes.cluster.add.node.timeout, fails

Manual workaround on the VM: kubeadm reset -f, rm /home/cloud/success, rerun setup-kube-system and deploy-kube-system.

versions

4.22 (also main). KVM, isolated network, CKS cluster with external nodes.

The steps to reproduce the bug

  1. Create a CKS cluster.
  2. Deploy a VM from a CKS-ready template on the cluster network and add it with addNodesToKubernetesCluster. It joins.
  3. Remove it with removeNodesFromKubernetesCluster.
  4. Add it again with addNodesToKubernetesCluster.

What to do about it?

Reset the VM's earlier provisioning state on add, in the same SSH step that already clears the cloud-init semaphores.

Activity

  1. github-actions commented on Nov 30, 2026

    @github-actions

    Warning

    threat detection engine error
    The threat detection engine encountered an error and could not complete analysis. This is a tooling failure, not a security finding.

    What happened

    The threat detection engine failed to produce results.

    Review the workflow run logs for details.

    🎯 Triage report

    A VM removed with removeNodesFromKubernetesCluster cannot rejoin when it is added again. The first boot left /home/cloud/success, so setup-kube-system and deploy-kube-system exit with "Already provisioned!" on the second boot. The add job then waits for a Ready node until it times out. The reporter's manual workaround is kubeadm reset, removing /home/cloud/success, and rerunning both scripts. The proposed fix is to reset the provisioning state during the add, in the same SSH step that clears the cloud-init semaphores.

    📊 Assessment

    Dimension Value Reasoning
    Type type:bug Re-add fails with a documented reproduction and workaround
    Component component:cks External node add and remove flow
    Severity Severity:Major A removed node cannot be reused; the add times out
    Labels type:bug, component:cks, Severity:Major Based on the issue text
    Coding agent Suitable Specific fix given, in an existing SSH step

    🔗 Similar issues

    💡 Notes and suggestions
    • Reproduction: add a VM from a CKS-ready template, remove it, then add it again on the same network.
    • Check that the reset does not affect nodes that are still in the cluster.

    Generated by Daily Issue Triage · copilot · haiku55 · ~8 AIC · ⊞ 3.8K · ◷

    Add this agentic workflow to your repo

    To install this agentic workflow, run

    gh aw add githubnext/agentics/workflows/daily-issue-triage.md@139fa09ef17cde4135e696ff8e7af09bc5ddfa6e
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions