This deployment guide shows you how to set up an Azure Kubernetes Service (AKS) cluster on which Coder can deploy.
Before proceeding, please make sure that you have the Azure CLI installed on your machine.
Step 1: Create the Resource Group
Create a resource group (be sure to set the $RESOURCE_GROUP
and $LOCATION
environment variables accordingly):
az group create \
--resource-group "$RESOURCE_GROUP" \
--location "$LOCATION"
Step 2: Create the Azure Kubernetes Service Cluster
Create the Azure Kubernetes Service Cluster (be sure to replace the placeholder and environment variables with the values that are applicable to you):
# You may have to run `az extension add --name aks-preview`
#
# You may also need to create a service principal manually using
# `az ad sp create-for-rbac --skip-assignment`, then setting the
# --service-principal and --client-secret flags
CLUSTER_NAME="MY_CLUSTER_NAME" LOCATION="##" SUBSCRIPTION="##" RESOURCE_GROUP="##" \
az aks create \
--name "$CLUSTER_NAME" \
--resource-group "$RESOURCE_GROUP" \
--subscription "$SUBSCRIPTION" \
--generate-ssh-keys \
--enable-addons http_application_routing \
--enable-cluster-autoscaler \
--location "$LOCATION" \
--max-count 10 \
--min-count 2 \
--node-vm-size Standard_B8ms \
--network-plugin "kubenet" \
--network-policy "calico"
Step 3: Post-Deployment
After deploying your AKS cluster, configure kubectl to point to your cluster.
- If you haven't already, install the Azure CLI and kubectl
- Initialize kubectl with the cluster credentials:
az aks get-credentials --name "$CLUSTER_NAME" --resource-group "$RESOURCE_GROUP"
- We recommend running Coder in a separate namespace; to do so, run:
kubectl create namespace coder
- If you're running Coder in a separate namespace, change the kubectl context to point to the newly created namespace:
kubectl config set-context --current --namespace=coder
Comments
0 comments
Please sign in to leave a comment.