-
Login to Azure Portal at http://portal.azure.com. Your Azure login ID will look something like
[email protected]
-
Open the Azure Cloud Shell
-
The first time Cloud Shell is started will require you to create a storage account. In our lab, you must click
Advanced
and enter an account name and share. -
Once your cloud shell is started, clone the workshop repo into the cloud shell environment
git clone https://github.com/Azure/blackbelt-aks-hackfest.git
-
In the cloud shell, you are automatically logged into your Azure subscription.
az login
is not required. -
Verify your subscription is correctly selected as the default
az account list
-
Find your RG name
az group list
[ { "id": "/subscriptions/b23accae-e655-44e6-a08d-85fb5f1bb854/resourceGroups/ODL-aks-v2-gbb-8386", "location": "centralus", "managedBy": null, "name": "ODL-aks-v2-gbb-8386", "properties": { "provisioningState": "Succeeded" }, "tags": { "AttendeeId": "8391", "LaunchId": "486", "LaunchType": "ODL", "TemplateId": "1153" } } ] # copy the name from the results above and set to a variable NAME= # We need to use a different cluster name, as sometimes the name in the group list has an underscore, and only dashes are permitted CLUSTER_NAME="${NAME//_}"
-
Create your AKS cluster in the resource group created above with 2 nodes, targeting Kubernetes version 1.7.7
# This command can take 5-25 minutes to run as it is creating the AKS cluster. Please be PATIENT... # set the location to one of the provided AKS locations (eg - centralus, eastus) LOCATION= az aks create -n $CLUSTER_NAME -g $NAME -c 2 -k 1.7.7 --generate-ssh-keys -l $LOCATION
-
Verify your cluster status. The
ProvisioningState
should beSucceeded
az aks list -o table Name Location ResourceGroup KubernetesVersion ProvisioningState Fqdn ------------------- ---------- -------------------- ------------------- ------------------- ------------------------------------------------------------------- ODLaks-v2-gbb-16502 centralus ODL_aks-v2-gbb-16502 1.7.7 Succeeded odlaks-v2--odlaks-v2-gbb-16-b23acc-17863579.hcp.centralus.azmk8s.io
-
Get the Kubernetes config files for your new AKS cluster
az aks get-credentials -n $CLUSTER_NAME -g $NAME
-
Verify you have API access to your new AKS cluster
Note: It can take 5 minutes for your nodes to appear and be in READY state. You can run
watch kubectl get nodes
to monitor status.kubectl get nodes NAME STATUS ROLES AGE VERSION aks-nodepool1-20004257-0 Ready agent 4m v1.7.7 aks-nodepool1-20004257-1 Ready agent 4m v1.7.7
To see more details about your cluster:
kubectl cluster-info Kubernetes master is running at https://odlaks-v2--odlaks-v2-gbb-11-b23acc-115da6a3.hcp.centralus.azmk8s.io:443 Heapster is running at https://odlaks-v2--odlaks-v2-gbb-11-b23acc-115da6a3.hcp.centralus.azmk8s.io:443/api/v1/namespaces/kube-system/services/heapster/proxy KubeDNS is running at https://odlaks-v2--odlaks-v2-gbb-11-b23acc-115da6a3.hcp.centralus.azmk8s.io:443/api/v1/namespaces/kube-system/services/kube-dns:dns/proxy kubernetes-dashboard is running at https://odlaks-v2--odlaks-v2-gbb-11-b23acc-115da6a3.hcp.centralus.azmk8s.io:443/api/v1/namespaces/kube-system/services/kubernetes-dashboard/proxy To further debug and diagnose cluster problems, use 'kubectl cluster-info dump'.
You should now have a Kubernetes cluster running with 2 nodes. You do not see the master servers for the cluster because these are managed by Microsoft. The Control Plane services which manage the Kubernetes cluster such as scheduling, API access, configuration data store and object controllers are all provided as services to the nodes.