Loading and Uploading Docker Images on AKS using Kubernetes
Procedure
- Update local docker config file. Remove previous config, if any.
-
Enable the Access Keys from the Azure Container Registry from the Azure Portal.
-
Login into Azure Container Registry using admin user name and password from the Azure Portal.
docker login <Azure Container Registry) -u <Admin UserName> -p <Password>
Sample Command for ACR Login:-
docker login ml5acr.azurecr.io -u ml5acr -p <password copied from azure portal>
-
Ref: https://docs.microsoft.com/en-us/azure/container-registry/container-registry-authentication#individual-login-with-azure-ad
- Check: Once you login, please ensure that ~/.docker/config.json has credentials, under auth.
cat ~/.docker/config.json { "auths": { "<acrName>.azurecr.io": { "auth": "XXXXXXX" } }, "HttpHeaders": { "User-Agent": "Docker-Client/17.12.0-ce (darwin)" }
-
- Run the following command to load docker images locally:
-
Upload images to the container registry. Run the following command:
./upload-images.sh
-
Run the following command to set registry secret for ACR:
./set-registry-secret.sh
Copyright © Cloud Software Group, Inc. All rights reserved.