Azure Kubernetes Service
Azure Kubernetes Service (AKS) is a managed Kubernetes service that lets you quickly deploy and manage clusters.
Last updated
Azure Kubernetes Service (AKS) is a managed Kubernetes service that lets you quickly deploy and manage clusters.
Last updated
If you don't have an Azure subscription, create an Azure free account before you begin.
The identity you're using to create your cluster has the appropriate minimum permissions. For more details on access and identity for AKS, see Access and identity options for Azure Kubernetes Service (AKS).
You should also have kubectl and helm installed on your terminal application. You can also use the Azure Cloud Shell which will come with these utilities pre-installed.
If you plan to use your local terminal you will need to Sign in with the Azure CLI before we can connect to our cluster.
These steps are taken from the Microsoft AKS QuickStart Guide. For more details on how to provision your AKS cluster, check out the Useful Links section of this page.
Sign in to the Azure portal.
On the Azure portal menu or from the Home page, select Create a resource.
Select Containers > Kubernetes Service.
On the Basics page, configure the following options:
Project details:
Select an Azure Subscription.
Select or create an Azure Resource group, such as myResourceGroup.
Cluster details:
Ensure the the Preset configuration is Standard ($$). For more details on preset configurations, see Cluster configuration presets in the Azure portal.
Enter a Kubernetes cluster name, such as myAKSCluster.
Select a Region for the AKS cluster, and leave the default value selected for Kubernetes version.
Select 99.5% for API server availability.
Primary node pool:
Leave the default values selected
Select Next: Node pools when complete.
Keep the default Node pools options. At the bottom of the screen, click Next: Access.
On the Access page, configure the following options:
The default value for Resource identity is System-assigned managed identity. Managed identities provide an identity for applications to use when connecting to resources that support Azure Active Directory (Azure AD) authentication. For more details about managed identities, see What are managed identities for Azure resources?
The Kubernetes role-based access control (RBAC) option is the default value to provide more fine-grained control over access to the Kubernetes resources deployed in your AKS cluster.
By default, Basic networking is used, and Container insights is enabled.
Click Review + create. When you navigate to the Review + create tab, Azure runs validation on the settings that you have chosen. If validation passes, you can proceed to create the AKS cluster by selecting Create. If validation fails, then it indicates which settings need to be modified.
It takes a few minutes to create the AKS cluster. When your deployment is complete, navigate to your resource by either:
Selecting Go to resource, or
Browsing to the AKS cluster resource group and selecting the AKS resource. In this example you browse for myResourceGroup and select the resource myAKSCluster.
For this section you will need to be either authenticated with the Azure CLI or Azure Cloud Shell to execute kubectl
and helm
command line tools.
Verify Azure CLI or Azure PowerShell is installed.
Connect to Azure via the az login
or Connect-AzAccount
command.
To perform these operations in a local shell installation:
Configure kubectl
to connect to your Kubernetes cluster using the az aks get-credentials command. The following command downloads credentials and configures the Kubernetes CLI to use them.
Verify the connection to your cluster using kubectl get
to return a list of the cluster nodes.
Output shows the single node created in the previous steps. Make sure the node status is Ready:
An ingress controller is a piece of software that provides reverse proxy, configurable traffic routing, and TLS termination for Kubernetes services. Kubernetes ingress resources are used to configure the ingress rules and routes for individual Kubernetes services.
Download the above zip file to a directory onto your system, then use the following command to unzip the contents to a directory.
In this section we will be using kubectl
and helm
to create deployment to a namespace on our AKS cluster. Since this is an Azure deployment we will be using Azure Blob Storage for our PDF uploads, Cosmos DB for our NoSQL database solution.
Copy the .example.env
to .env
then edit the contents with your deployment settings.
Next create an apps/
directory in the root of this project folder. This will be where we unpack helm
charts to create deployments from.
Next step is to run the deployment scripts(s). This can be done with 1 deployment script or by running each script separately. Each script will prompt the user for information related to that scripts purpose.
Run the single script can be running bash scripts/deploy.sh
Run each individual script. Follow the code block below. See the README.md that was included with the zip file for details about each script.
When this has finished successfully you will see an terminal output for all of the services in this deployment.
If the deployment is NOT showing on the domain that you configured as the BASE_URL environment variable you will most likely need to configure the DNS records. For this tutorial, we used Cloudflare, but can also be done with AWS Route 53.