Kubernetes cleanup process

12/13/2019

Trying to investigate certain things in Kubernetes:

  1. What are the things that needs to be cleaned up when a pod is getting deleted ?

  2. How are connections handled during the termination phase ?

-- XnaijaZ
kubernetes

1 Answer

12/14/2019

When Pod is deleted, you need to delete below resources

  1. configmap
  2. secrets
  3. services
  4. certificates
  5. Ingress
  6. Services

Deployment or replicaset needs to be deleted first if pods are part of these resources and deletion of pod is taken care automatically

Connections are handled until there is one pod is running, and service is not yet deleted. Deleting configmaps, secrets may not impact as pod would have picked up these details at the startup

-- Shambu
Source: StackOverflow