I would like to understand what kind of drain does gke perform at the time of node deletion. does it use --ignore-daemonset or --force options ? is there any wait any for node removal case.
Hi @subithal,
Welcome to the Google Cloud Community!
Google Kubernetes Engine (GKE) should perform node draining in the same manner as native Kubernetes.
I conducted the following experiment in my console. Consider a GKE standard cluster with three nodes. Each node has an empty pod deployed from a deployment manifest and another pod deployed by a DaemonSet manifest. Let's designate these nodes as Node A, Node B, and Node C.
Node A - gke-cluster-1-default-pool-790db6e2-dz9l
Node B - gke-cluster-1-default-pool-790db6e2-lv8j
Node C - gke-cluster-1-default-pool-790db6e2-rz33
Node A - Running the command k drain gke-cluster-1-default-pool-790db6e2-dz9l
Result: Both pods remain undeleted. As depicted in the accompanying image, an error will occur.
Node B - Running the command k drain gke-cluster-1-default-pool-790db6e2-lv8j --ignore-daemonsets --delete-emptydir-data
Result: The pod deployed by the Deployment manifest is deleted, while the pod created by the DaemonSet is ignored.
Node C - Running the command k drain gke-cluster-1-default-pool-790db6e2-rz33 --force
Result: Both pods remain undeleted. The same error is received as without the --force
flag.
I hope this answers your question. Thank you. 😃