metral / demo-multicloud

Multicloud Kubernetes Clusters

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

demo-multicloud

Deploys Kubernetes clusters in EKS and AKS.

Pre-Requisites

  1. Install Pulumi.
  2. Install Node.js.
  3. Install a package manager for Node.js, such as NPM or Yarn.
  4. Install kubectl.

AWS

  1. Configure AWS Credentials.
  2. Install AWS IAM Authenticator for Kubernetes.

Azure

  1. Setup Azure

Initialize the Pulumi Project

  1. Clone the repo:

    git clone https://github.com/metral/demo-multicloud
    cd demo-multicloud
  2. Install the dependencies.

    npm install
  3. Create a new Pulumi stack named dev.

    pulumi stack init dev
  4. 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 Kubernetes clusters

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

Clean Up

Run the following command to tear down the resources that are part of our stack.

  1. Run pulumi destroy to tear down all resources. You'll be prompted to make sure you really want to delete these resources.

    pulumi destroy
  2. 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.

About

Multicloud Kubernetes Clusters


Languages

Language:TypeScript 100.0%