Skip to content

Instantly share code, notes, and snippets.

@chenchun
Last active July 30, 2018 07:37
Show Gist options
  • Save chenchun/39776e2dd214b87a19d60fb5758b8853 to your computer and use it in GitHub Desktop.
Save chenchun/39776e2dd214b87a19d60fb5758b8853 to your computer and use it in GitHub Desktop.
kubernetes pod lifecycle #k8s, #kubernetes

kubernetes/kubernetes#20379 (comment)

@dcbw, your case seems different. The two DELETE events were just caused by how apisever and kubelet handles pod deletion.

apiserver sets the DeletionTimeStamp -> kubelet gets a DELETE event kubelet terminates the containers gracefully kubelet sends a request to the apiserver to actually remove the pod object (with DeletionGracePeriod=0) apiserver sets the DeletionGracePeriod -> kubelet gets a DELETE event again because of the udpate apiserver deletes the object -> kubelet gets a REMOVE event.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment