In TKGi v1.19.2, a change was introduced in containerd to pin the pause image and to prevent it from being deleted during garbage collection.
However the image is pinned when the image is updated and the image is not updated if TKGi cluster is upgraded from 1.18 to 1.19 or from 1.19 to 1.20.
This KB explains the steps to pin the image in these upgrade scenarios.
Note that the pause image is pinned on newly created clusters and on clusters where pause image has been reloaded after garbage collection.
TKGi v1.18.5 or greater
TKGi v1.19.2 or greater
TKGi v1.20 or greater
If garbage collection has removed the image before it is pinned, then the load-image script will reload the image and pin it.
# bosh -d <service-instance-ID> ssh <worker-node>
Switch to root user and execute the following script
# sudo -i
# /var/vcap/jobs/load-images/bin/post-start
Confirm the image is pinned
# /var/vcap/packages/containerd/bin/ctr -n k8s.io images list | grep pause
If the image has not been removed, then it can be manually pinned on all workers with:
# bosh -d <service-instance_ID> ssh -c 'sudo /var/vcap/packages/containerd/bin/ctr --address /var/vcap/sys/run/containerd/containerd.sock -n k8s.io images label registry.k8s.io/pause:3.9 io.cri-containerd.pinned=pinned' worker