I have k8s cluster with three workers and when I explicitly creates the pod, corresponding docker images get downloaded to worker. When I explicitly deletes the pods corresponding docker images are still present on worker nodes. Is this expected case?
Is this expected case?
Possibly, considering the Kubernetes Garbage collection policy for images:
Kubernetes manages lifecycle of all images through
imageManager
, with the cooperation ofcadvisor
.The policy for garbage collecting images takes two factors into consideration:
HighThresholdPercent
andLowThresholdPercent
.
Disk usage above the high threshold will trigger garbage collection.
The garbage collection will delete least recently used images until the low threshold has been met.