Stands up an Azure Kubernetes Service (AKS) cluster.
To deploy your infrastructure, follow the below steps.
-
Create a new stack:
$ pulumi stack init Enter a stack name: dev
-
Set the required configuration variable for this program:
$ pulumi config set azure:location westus $ az login
-
Stand up the AKS cluster:
$ pulumi up
-
After 10-15 minutes, your cluster will be ready, and the kubeconfig YAML you'll use to connect to the cluster will be available as an output. You can save this kubeconfig to a file like so:
$ pulumi stack output kubeconfig > kubeconfig.yaml
Once you have this file in hand, you can interact with your new cluster as usual via
kubectl
:$ KUBECONFIG=./kubeconfig.yaml kubectl get nodes
-
From there, feel free to experiment. Simply making edits and running
pulumi up
will incrementally update your stack. -
Once you've finished experimenting, tear down your stack's resources by destroying and removing it:
$ pulumi destroy --yes $ pulumi stack rm --yes