Azure Kubernetes Service (AKS) cluster
Creates an Azure Kubernetes Service (AKS) cluster using F#
This example lives in the pulumi/examples repository. Check out just this directory to use it:
git clone --filter=blob:none --sparse https://github.com/pulumi/examples pulumi-examplesgit -C pulumi-examples sparse-checkout set classic-azure-fs-akscd pulumi-examples/classic-azure-fs-aksStands up an Azure Kubernetes Service (AKS) cluster, written in F#.
Prerequisites#
Deploying the example#
-
Create a new stack:
Terminal window pulumi stack init dev -
Log in to the Azure CLI (you will be prompted to do this during deployment if you forget this step):
Terminal window az login -
Set the Azure location and subscription to deploy into:
Terminal window pulumi config set azure:location westeuropepulumi config set azure:subscriptionId <YOUR_SUBSCRIPTION_ID> -
Deploy the stack:
Terminal window pulumi up -
Export the Kubernetes config and use it to access the cluster:
Terminal window pulumi stack output kubeconfig --show-secrets > kubeconfig.yamlKUBECONFIG=./kubeconfig.yaml kubectl get nodes
Using the Makefile#
To make it easier to try out, you can use the included Makefile instead of the native commands above:
make deploy # builds the project and runs `pulumi up -y`make exportconfig # writes the cluster kubeconfig to kubeconfig.yamlTo list all make targets, run:
make helpThe Makefile also works as documentation for the commands you need to run to deploy the application.
Cleaning up#
Once you are done, destroy the stack and remove it. With the Makefile:
make destroymake rmstackOr with the native commands:
pulumi destroypulumi stack rm