K3s: [master, 1.19, 1.20] Node stuck at deletion due to finalizer - regression

Created on 9 Dec 2020  路  2Comments  路  Source: k3s-io/k3s

Environment
k3s version v1.19.4+k3s-989c9369 (989c9369)
Issue
Deletion of node is stuck due to presence of finalizer. This seems to be a regression

Steps to reproduce

  1. Create a 3 node cluster
  2. Verify nodes are Ready and pods are Running
  3. Delete node3 using kubectl delete node
    Deletion of a node is stuck, unless finalizer is removed.
    finalizers:
    - wrangler.cattle.io/managed-etcd-controller
    - wrangler.cattle.io/node
    labels:
--
          f:finalizers:
            .: {}
            v:"wrangler.cattle.io/managed-etcd-controller": {}
            v:"wrangler.cattle.io/node": {}

Related issue https://github.com/rancher/rke2/issues/401

Most helpful comment

Note: To delete the node that is stuck during delete

kubectl get node -o name <nodename> | xargs -i kubectl patch {} -p '{"metadata":{"finalizers":[]}}' --type=merge

All 2 comments

The issue was also reproduced in v1.19.3+k3s3. Since the issue is pre-existing we don't want it to block our imminent releases. We'll mention this in the release notes. I've bumped the milestone to the next set of patch releases. This will need to get fixed in 1.19, 1.20, and master.
We'll see if there is a workaround so that this can also be indicated in the release notes.

The issue seems to happen intermittently and will not always be observed. The release notes will briefly explain the issue and workaround to fix the finalizers so the node(s) can be deleted.

Note: To delete the node that is stuck during delete

kubectl get node -o name <nodename> | xargs -i kubectl patch {} -p '{"metadata":{"finalizers":[]}}' --type=merge
Was this page helpful?
0 / 5 - 0 ratings

Related issues

weber-software picture weber-software  路  3Comments

dduportal picture dduportal  路  4Comments

ashrafgt picture ashrafgt  路  3Comments

joakimr-axis picture joakimr-axis  路  3Comments

pierreozoux picture pierreozoux  路  4Comments