How can I uncordon a node in an automatic cluster?

Hey, I'm learning Kubernetes on GKE. 

I created an Autopilot cluster, then ran `kubectl get nodes`, then `kubectl cordon <one of the two nodes>` on it. Now when I run `kubectl get nodes` again I see:

NAME STATUS ROLES AGE VERSION
gk3-super-cube-pool-2-45f5208b-h8j8 Ready <none> 21m v1.28.7-gke.1026000
gk3-super-cube-pool-2-c46ec490-2wcn Ready,SchedulingDisabled <none> 3h33m v1.28.7-gke.1026000

I found in Google that to undo the cordon I need to run `kubectl uncordon <node>` but then I got this:

(gcp-tests-2024)$ kubectl uncordon gk3-super-cube-pool-2-c46ec490-2wcn
error: unable to uncordon node "gk3-super-cube-pool-2-c46ec490-2wcn": admission webhook "warden-validating.common-webhooks.networking.gke.io" denied the request: GKE Warden rejected the request because it violates one or more constraints.
Violations details: {"[denied by autogke-no-node-updates]":["Uncordon on nodes is not allowed in Autopilot."]}

What is the solution here? I can't delete the node either

(gcp-tests-2024)$ kubectl delete node gk3-super-cube-pool-2-c46ec490-2wcn
Error from server (GKE Warden constraints violations): admission webhook "warden-validating.common-webhooks.networking.gke.io" denied the request: GKE Warden rejected the request because it violates one or more constraints.
Violations details: {"[denied by autogke-no-node-updates]":["Operation on nodes is not allowed in Autopilot."]}

Appreciate your help!

 

0 1 36
1 REPLY 1

You shouldn't need to do much about it. After you cordoned the node nothing new will be scheduled to this node. To remove it you can delete / reschedule all pods that are running on it; once gone it should be deleted by autopilot automatically.

Top Labels in this Space