{"id":18332445,"url":"https://github.com/tigera-solutions/aks-workshop-prep","last_synced_at":"2025-07-21T04:34:37.370Z","repository":{"id":185355034,"uuid":"673309150","full_name":"tigera-solutions/aks-workshop-prep","owner":"tigera-solutions","description":"This repository will help you to build an AKS cluster using Azure Cloud Shell for Tigera's Calico Cloud workshop.","archived":false,"fork":false,"pushed_at":"2024-08-21T17:51:23.000Z","size":30,"stargazers_count":8,"open_issues_count":0,"forks_count":6,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-06T03:33:40.937Z","etag":null,"topics":["aks","azure","cc","prep","regismartins","workshop"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tigera-solutions.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-08-01T10:43:23.000Z","updated_at":"2024-12-03T19:05:55.000Z","dependencies_parsed_at":null,"dependency_job_id":"97b995f0-512f-4a9d-b82e-605fd6e25d60","html_url":"https://github.com/tigera-solutions/aks-workshop-prep","commit_stats":null,"previous_names":["tigera-solutions/aks-workshop-prep"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/tigera-solutions/aks-workshop-prep","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tigera-solutions%2Faks-workshop-prep","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tigera-solutions%2Faks-workshop-prep/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tigera-solutions%2Faks-workshop-prep/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tigera-solutions%2Faks-workshop-prep/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tigera-solutions","download_url":"https://codeload.github.com/tigera-solutions/aks-workshop-prep/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tigera-solutions%2Faks-workshop-prep/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266241117,"owners_count":23898065,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aks","azure","cc","prep","regismartins","workshop"],"created_at":"2024-11-05T19:39:06.416Z","updated_at":"2025-07-21T04:34:37.347Z","avatar_url":"https://github.com/tigera-solutions.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Calico Cloud on AKS - Workshop Environment Preparation\n\nThis repository will guide you through the preparation process of building an AKS cluster using the Azure Cloud Shell that will be used in Tigera's Calico Cloud workshop. The goal is to reduce the time used for setting up infrastructure during the workshop, optimizing the Calico Cloud learning and ensuring everyone is on the same page.\n\n## Getting Started with Azure Cloud Shell\n\nThe following are the basic requirements to **start** the workshop.\n\n* Azure Account [Azure Portal](https://portal.azure.com)\n* Git [Git SCM](https://git-scm.com/downloads)\n* Azure Cloud Shell [https://shell.azure.com](https://shell.azure.com)\n* Azure AKS Cluster \n\n# Instructions\n\n1. Login to Azure Portal at http://portal.azure.com.\n2. Open the Azure Cloud Shell and choose Bash Shell (do not choose Powershell)\n\n   ![img-cloud-shell](https://user-images.githubusercontent.com/104035488/214944180-0b72595f-b58d-445d-9bde-2530bd491ace.png)\n\n3. The first time Cloud Shell is started will require you to create a storage account.\n\n   \u003e Note: In the cloud shell, you are automatically logged into your Azure subscription.\n\n4. [Optional] If you have more than one Azure subscription, ensure you are using the one you want to deploy AKS to.\n\n   View subscriptions\n   ```bash\n   az account list\n   ```\n\n   Verify selected subscription\n   ```bash\n   az account show\n   ```\n\n   Set correct subscription (if needed)\n   ```bash\n   az account set --subscription \u003csubscription_id\u003e\n   ```\n   \n   Verify correct subscription is now set\n   ```bash\n   az account show\n   ```\n\n5. Configure the kubectl autocomplete.\n\n   ```bash\n   source \u003c(kubectl completion bash) \u0026\u0026  source /usr/share/bash-completion/bash_completion\n   echo \"source \u003c(kubectl completion bash)\" \u003e\u003e ~/.bashrc\n   echo \"source /usr/share/bash-completion/bash_completion\" \u003e\u003e ~/.bashrc\n   ```\n\n   You can also use a shorthand alias for kubectl that also works with completion:\n\n   ```bash\n   alias k=kubectl\n   complete -o default -F __start_kubectl k\n   echo \"alias k=kubectl\"  \u003e\u003e ~/.bashrc\n   echo \"complete -o default -F __start_kubectl k\" \u003e\u003e ~/.bashrc\n   ```\n\n6. [Optional] Instal k9s, if you like it.\n\n   ```bash\n   curl --silent --location \"https://github.com/derailed/k9s/releases/download/v0.32.3/k9s_Linux_amd64.tar.gz\" | tar xz -C /tmp\n   mkdir -p ~/.local/bin\n   mv /tmp/k9s ~/.local/bin \n   k9s version\n   ```\n\n## Deploy an Azure AKS Cluster\n\n1. Define the environment variables to be used by the resources definition.\n\n   \u003e **NOTE**: In the following section, we'll create some environment variables. If your terminal session restarts, you may need to reset these variables. You can do that using the following command:\n   \u003e\n   \u003e ```console\n   \u003e source ~/workshopvars.env\n   \u003e ```\n\n   ```bash\n   export RESOURCE_GROUP=tigera-workshop\n   export CLUSTERNAME=aks-workshop\n   export LOCATION=canadacentral\n   # Persist for later sessions in case of disconnection.\n   echo export RESOURCE_GROUP=$RESOURCE_GROUP \u003e ~/workshopvars.env\n   echo export CLUSTERNAME=$CLUSTERNAME \u003e\u003e ~/workshopvars.env\n   echo export LOCATION=$LOCATION \u003e\u003e ~/workshopvars.env\n   ```\n\n2. If not created, create the Resource Group in the desired Region.\n   \n   ```bash\n   az group create \\\n     --name $RESOURCE_GROUP \\\n     --location $LOCATION\n   ```\n   \n3. Create the AKS cluster with Azure CNI network plugin.\n   \n   ```bash\n   az aks create \\\n     --resource-group $RESOURCE_GROUP \\\n     --name $CLUSTERNAME \\\n     --kubernetes-version 1.29 \\\n     --location $LOCATION \\\n     --node-count 2 \\\n     --node-vm-size Standard_B2ms \\\n     --max-pods 100 \\\n     --generate-ssh-keys \\\n     --network-plugin azure\n   ```\n\n4. Verify your cluster status. The `ProvisioningState` should be `Succeeded`\n\n   ```bash\n   az aks list -o table | grep $CLUSTERNAME\n   ```\n \n   You may get an output like the following:\n\n   \u003cpre\u003e\n   WARNING: [Warning] This output may compromise security by showing the following secrets: keyData, ssh, linuxProfile, publicKeys. Learn more at: https://go.microsoft.com/fwlink/?linkid=2258669\n   aks-workshop      canadacentral  tigera-workshop       1.29                 1.29.2                      Succeeded            aks-worksh-tigera-workshop-03cfb8-mllwb5a6.hcp.canadacentral.azmk8s.io\n   \u003c/pre\u003e\n\n5. Get the credentials to connect to the cluster.\n   \n   ```bash\n   az aks get-credentials --resource-group $RESOURCE_GROUP --name $CLUSTERNAME\n   ```\n\n6. Verify you have API access to your new AKS cluster\n\n   ```bash\n   kubectl get nodes\n   ```\n\n   The output will be something similar to the this:\n\n   \u003cpre\u003e\n   NAME                                STATUS   ROLES    AGE   VERSION\n   aks-nodepool1-30304837-vmss000000   Ready    \u003cnone\u003e   10m   v1.29.2\n   aks-nodepool1-30304837-vmss000001   Ready    \u003cnone\u003e   10m   v1.29.2\n   \u003c/pre\u003e\n\n   To see more details about your cluster:\n\n   ```bash\n    kubectl cluster-info\n   ```\n\n   The output will be something similar to the this:\n   \u003cpre\u003e\n   Kubernetes control plane is running at https://aks-zero-t-rg-zero-trust-wo-03cfb8-b3feb0f8.hcp.canadacentral.azmk8s.io:443\n   CoreDNS is running at https://aks-zero-t-rg-zero-trust-wo-03cfb8-b3feb0f8.hcp.canadacentral.azmk8s.io:443/api/v1/namespaces/kube-system/services/kube-dns:dns/proxy\n   Metrics-server is running at https://aks-zero-t-rg-zero-trust-wo-03cfb8-b3feb0f8.hcp.canadacentral.azmk8s.io:443/api/v1/namespaces/kube-system/services/https:metrics-server:/proxy\n\n   To further debug and diagnose cluster problems, use 'kubectl cluster-info dump'.\n   \u003c/pre\u003e\n\n   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.\n\n7. Verify the settings required for Calico Cloud.\n   \n   ```bash\n   az aks show --resource-group $RESOURCE_GROUP --name $CLUSTERNAME --query 'networkProfile'\n   ```\n\n   You should see \"networkPlugin\": \"azure\" and \"networkPolicy\": null (networkPolicy will just not show if it is null).\n\n8. Verify the transparent mode by running the following command in one node\n\n   ```bash\n   VMSSGROUP=$(az vmss list --output table | grep -i $RESOURCE_GROUP | grep -i $CLUSTERNAME | awk -F ' ' '{print $2}')\n   VMSSNAME=$(az vmss list --output table | grep -i $RESOURCE_GROUP | grep -i $CLUSTERNAME | awk -F ' ' '{print $1}')\n   az vmss run-command invoke -g $VMSSGROUP -n $VMSSNAME --scripts \"cat /etc/cni/net.d/*\" --command-id RunShellScript --instance-id 0 --query 'value[0].message' --output table\n   ```\n   \n   \u003e output should contain \"mode\": \"transparent\"\n\n9. Stop the Cluster until the workshop starts.\n\n   ```bash\n   az aks stop --resource-group $RESOURCE_GROUP --name $CLUSTERNAME\n   ```\n\n10. To start your cluster when the workshop time has come use:\n\n    ```bash\n    az aks start --resource-group $RESOURCE_GROUP --name $CLUSTERNAME\n    ```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftigera-solutions%2Faks-workshop-prep","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftigera-solutions%2Faks-workshop-prep","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftigera-solutions%2Faks-workshop-prep/lists"}