Pod Exec Fails With Permission Issue

Problem

After you upgrade runtime from Docker to Containerd, nodes upgrades successfully, but if you try to exec some pods it fails with the below error logs:

Pod logs
Copy

Environment

  • Platform9 Managed Kubernetes - v5.6.8
  • Kubernetes version - 1.22.9

Cause

The directory listed below does not have correct permission inside directory /var/lib/containerd after runtime upgrade to containerd.

Permission
Copy

Resolution

You need to manually change the permission to 0700 for above directory using chmod command.

Change permission
Copy

Directory permissions inside /var/lib/containerd should look like below:

/var/lib/containerd
Copy
Type to search, ESC to discard
Type to search, ESC to discard
Type to search, ESC to discard