How to clean stale images from containerd in AKS?

Tanul 1,281 Reputation points
2022-10-25T07:17:07.027+00:00

Team,

As far as I know AKS now use containerd in the backend. There are lot of stale images showing in the container environment of our AKS nodes.

Is there any reliable and production ready procedure to remove those stale and vulnerable images.

Kindly suggest. Thank you

Kind Regards,
Tanul

Azure Kubernetes Service (AKS)
Azure Kubernetes Service (AKS)
An Azure service that provides serverless Kubernetes, an integrated continuous integration and continuous delivery experience, and enterprise-grade security and governance.
2,073 questions
{count} votes

1 answer

Sort by: Most helpful
  1. srbhatta-MSFT 8,551 Reputation points Microsoft Employee
    2022-10-25T10:37:17.2+00:00

    Hello @Tanul ,
    Welcome to Microsoft QnA.
    I had a quick word with the AKS product team on this query of yours.
    We have a preview feature available just for this ask, check it out here - https://learn.microsoft.com/en-us/azure/aks/image-cleaner?tabs=azure-cli
    This feature has been specifically designed to address this pain point.

    Although it is in preview, it should work if you follow the steps, else if you want to wait for it to be GA, you need to manually clean up the images until ImageCleaner becomes GA, or implement the Open Source project yourself: https://github.com/Azure/eraser
    However, please note that the open source project will not be supported by AKS and only via the project's GitHub issues page.

    Thank you. Let me know if you have any additional questions!

    -------------

    If you find the above information useful, please "Accept as Answer" and "Upvote".


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.