Hi there,

At first glance is looks very trivia to use a remote container registry with MicroK8s, but there are SO many ways to do it, and furthermore you can multiple it by the many changes made to MicroK8s. This small guide describes how to get it to work with MicroK8s version 1.20.

First of all, make sure that you have a proper configuration in Azure. You need to create a Container Registry. Go to your registry and click “Access Keys”. There you should see the Username, and password and login server.

Log into your MicroK8s server(s)

Edit this file: /var/snap/microk8s/current/args/containerd-template.toml (assuming you are running a snap version of MicroK8s on a eg. Ubuntu)

Add this to the end of the file (Important: Remember indents)

    endpoint = "https://"
    username = ""
    password = ""

Execute a microk8n stop

Execute a microk8n start cycle

And you are ready to deploy from Azure Container Registry!