Deploys Kubernetes clusters in EKS and AKS.
- Install Pulumi.
- Install Node.js.
- Install a package manager for Node.js, such as NPM or Yarn.
- Install
kubectl
.
AWS
Azure
-
Clone the repo:
git clone https://github.com/metral/demo-multicloud cd demo-multicloud
-
Install the dependencies.
npm install
-
Create a new Pulumi stack named
dev
.pulumi stack init dev
-
Set the Pulumi configuration variables for the project.
Note: Select any valid Kubernetes regions for the providers.
pulumi config set azure:location westus2 pulumi config set aws:region us-west-2 pulumi config set accountIdRoot arn:aws:iam::<ACCOUNT_ID>:root
Create the cluster and deploy the workload by running an update:
pulumi up
The update takes ~15 minutes.
Once the update is complete, verify the cluster, node groups, and Pods are up and running:
pulumi stack output aksKubeconfig > kubeconfig-aks.json
pulumi stack output eksKubeconfig > kubeconfig-eks.json
<Choose a kubeconfig, then>
export KUBECONFIG=`pwd`/kubeconfig-aks.json
or
export KUBECONFIG=`pwd`/kubeconfig-eks.json
kubectl get nodes -o wide --show-labels
kubectl get pods --all-namespaces -o wide --show-labels
Run the following command to tear down the resources that are part of our stack.
-
Run
pulumi destroy
to tear down all resources. You'll be prompted to make sure you really want to delete these resources.pulumi destroy
-
To delete the stack, run the following command.
pulumi stack rm
Note: This command deletes all deployment history from the Pulumi Console and cannot be undone.