GKE 1.1.1 and kubectl delete resource Terminating

11/20/2015

A new GKE cluster created at v1.1.1 and using latest kubectl (from gcloud components update) when deleting resources (say a pod) sometimes kubectl get pods in a 'Terminating' state and other times they delete (are removed from kubectl get pods output) right away.

NAME                         READY     STATUS        RESTARTS   AGE
cassandra                    1/1       Terminating   0          44s

Is this new behavior of kubectl? I don't recall it doing this at my prior levels.

-- David Martin
google-kubernetes-engine
kubernetes

2 Answers

11/21/2015

You can explicitly set TerminationGracePeriodSeconds to zero in the PodSpec to obtain the old behavior.

-- brendan
Source: StackOverflow

11/20/2015

Yes, it is new behavior in v1.1.1. PR #9165 added graceful deletion of pods, which causes them to appear in the "Terminating" state for a short amount of time. Issue #1535 has some more background discussion.

-- CJ Cullen
Source: StackOverflow