Skip to content

Instantly share code, notes, and snippets.

@mysticrenji
Last active December 18, 2020 04:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mysticrenji/d3a7b179be7ce578d29e8fc3a0c828f3 to your computer and use it in GitHub Desktop.
Save mysticrenji/d3a7b179be7ce578d29e8fc3a0c828f3 to your computer and use it in GitHub Desktop.
Scripts related to integration of K3s Cluster on Azure VM and Azure Arc
#Install Helm
curl https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 | bash
#Install Azure CLI
curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash
#Azure Login via CLI
az login
#Azure Resource Group Creation
#Azure Arc is available only on eastus,westeurope,westcentralus
az group create -l eastus -n <ResourceGroupName>
#Add Azure extensions related to kubernetes
az extension add --name connectedk8s
az extension add --name k8sconfiguration
#Register Azure Providers for Kubernetes Configuration
az provider register --namespace Microsoft.Kubernetes
az provider register --namespace Microsoft.KubernetesConfiguration
#Check whether Azure providers has been installed. Will take approx 10 mins to register
az provider show -n Microsoft.Kubernetes -o table
az provider show -n Microsoft.KubernetesConfiguration -o table
#Create Azure Arc Resource and connect it
az connectedk8s connect --name <AzureArcName> --resource-group <ResourceGroupName> -l eastus
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment