-
Notifications
You must be signed in to change notification settings - Fork 0
Deploying Azure
Aaron-Pierce edited this page Apr 22, 2023
·
4 revisions
To deploy for Azure, you must:
- Have the Azure CLI installed, and be logged in (run
az login
) - Create an active directory service principal account by running
az ad sp create-for-rbac --skip-assignment
- Create a terraform.tfvars with the appId and password which that command outputs:
appId = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" password = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
- Run
terraform init
before runningterraform apply
for the first time - Run
terraform apply
After, you can run az aks get-credentials --resource-group $(terraform output -raw resource_group_name) --name $(terraform output -raw kubernetes_cluster_name)
to automatically configure kubectl
No extra steps are needed for Azure, simply run terraform destroy
To resolve cluster connectivity issues (similar to Error: Kubernetes cluster unreachable: ... try setting KUBERNETES_MASTER environment variable
), you may need to run export KUBE_CONFIG_PATH=~/.kube/config
. Be sure that you have configured kubectl with az aks get-credentials --resource-group $(terraform output -raw resource_group_name) --name $(terraform output -raw kubernetes_cluster_name)
as well.