This repository contains the code to deploy a simple Kubernetes cluster on Azure using Pulumi.
Before running the Pulumi program, you need to have the following installed and configured:
- An Azure subscription with sufficient permissions to create resources
- Node.js (version 14 or higher)
- Pulumi CLI (version 3.0 or higher)
-
Clone the repository to your local machine:
-
Install the dependencies:
npm install- Log in to your Azure account:
pulumi login azure- Preview the changes:
pulumi preview- Deploy the stack:
pulumi up- After the deployment is complete, you can retrieve the kubeconfig file for your cluster:
pulumi stack output kubeconfig > kubeconfig.yamlThe program outputs the following resources:
- Azure Resource Group
- Azure Virtual Network
- Azure Subnet
- Azure Kubernetes Service Cluster
- Kubernetes Config
You can retrieve the output values using the pulumi stack output command.
To remove all the resources created by the Pulumi program, run the following command:
pulumi destroy