Creating and connecting aks cluster to registry
- To create aks use aks quickstart cli
-
General approach to connect a k8s cluster to a private registry
- This inolves creating secrets
- In AKS we can attach acr while creating or even after creating
# update into existing cluster
az aks update --resource-group $RESOURCE_GROUP --name $CLUSTER_NAME --attach-acr qtk8slearning
- Secrets and configmaps: we use secrets to store sensitive information but k8s does just base64 encoding. AKS offers using keyvalue service to load secrets
- If the secrets are sensitive azure offers key valult integration Refer Here
-
In this yaml file Refer Here replace the image names of the services which are in your registry with something like
qtk8slearning.azurecr.io/learning/order-service:v1.0.0and deploy - K8s namespaces can be used as virtual clusters
