Skip to content

Latest commit

 

History

History
56 lines (44 loc) · 1.16 KB

AKS.md

File metadata and controls

56 lines (44 loc) · 1.16 KB

Azure Kubernetes Service

// Bash
export RESOURCE_GROUP=rg-contoso-video
export CLUSTER_NAME=aks-contoso-video
// Azure CLI
az aks create \
    --resource-group $RESOURCE_GROUP \
    --name $CLUSTER_NAME \
    --node-count 2 \
    --enable-addons http_application_routing \
    --generate-ssh-keys \
    --node-vm-size Standard_B2s \
    --network-plugin azure
// Azure CLI
az aks nodepool add \
    --resource-group $RESOURCE_GROUP \
    --cluster-name $CLUSTER_NAME \
    --name userpool \
    --node-count 2 \
    --node-vm-size Standard_B2s

Link your Kubernetes cluster with kubectl by running the following command

// Azure CLI
az aks get-credentials --name $CLUSTER_NAME --resource-group $RESOURCE_GROUP

// Bash
kubectl get nodes

Run the az network dns zone list command to query the Azure DNS zone list

// Azure CLI
az aks show -g $RESOURCE_GROUP -n $CLUSTER_NAME -o tsv --query addonProfiles.httpApplicationRouting.config.HTTPApplicationRoutingZoneName

returns:
<uuid>.<region>.aksapp.io

Delete cluster

az aks delete --resource-group myResourceGroup --name myAKSCluster --no-wait