Deployment on Azure AKS¶
You can use the API Deployer Kubernetes integration to deploy your API Services on Azure Kubernetes Service (AKS).
Setup¶
Create your ACR registry¶
Follow the Azure documentation on how to create your ACR registry. We recommend that you pay extra attention to the pricing plan since it is directly related to the registry storage capacity.
Create your AKS cluster¶
Follow Azure’s documentation on how to create your AKS cluster. We recommend that you allocate at least 8GB of memory for each cluster node.
Once the cluster is created, you must modify its IAM credentials to grant it access to ACR (Kubernetes secret mode is not supported). This is required for the worker nodes to pull images from the registry.
Prepare your local az
, docker
and kubectl
commands¶
Follow the Azure documentation to make sure that:
- Your local (on the DSS machine)
az
command is properly logged in. As of October 2019, this implies running theaz login --service-principal --username client_d --password client_secret --tenant tenant_id
command. You must use a service principal that has sufficient IAM permissions to write to ACR and full control on AKS. - Your local (on the DSS machine)
docker
command can successfully push images to the ACR repository. As of October 2019, this implies running theaz acr login --name your-registry-name
. - Your local (on the DSS machine)
kubectl
command can interact with the cluster. As of October 2019, this implies running theaz aks get-credentials --resource-group your-rg --name your-cluster-name
command.
Setup the infrastructure¶
Follow the usual setup steps as indicated in Setting up. In particular, to set up the image registry, in the API Deployer go to Infrastructures > your-infrastructure > Settings, and in the “Kubernetes cluster” section, set the “Registry host” field to your-registry-name.azurecr.io
.
Deploy¶
You’re now ready to deploy your API Services to Azure AKS.