Container keeps running on node after Kubernetes pod deletion

Problem

  • Container keeps running on the node even after you deleted the pod from the Kubernetes cluster.
  • Kubelet logs show that an API call was made to delete the pod but the container associated with that pod keeps running on the node.
  • Message logs show it did try to kill the container using SIGKILL but failed to delete the container.
On node - Messages log
Copy
On node - Kubelet log
Copy

Environment

  • Platform9 Managed Kubernetes - v 5.4
  • Docker and linux kernel versions are 19.03.11 and 5.4.0-123-generic respectively.
Version output
Copy

Cause

This is an upstream docker bug on docker 19.03 version, which kept container running in the background.

Upstream bug
Copy

Resolution

  • Manual deletion of the container can be done on the node.
  • Upgrade docker to possible bug fix version 20.10.
Type to search, ESC to discard
Type to search, ESC to discard
Type to search, ESC to discard