Skip to content

metral/multicloud-clusters

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

multicloud-clusters

Deploys a Kubernetes cluster across multiple cloud providers AWS, Azure, GKE and a local KinD cluster.

Pre-Requisites

  1. Install Pulumi.
  2. Install Node.js.
  3. Install a package manager for Node.js, such as NPM or Yarn.
  4. Configure AWS Credentials.
  5. Install AWS IAM Authenticator for Kubernetes.
  6. Install kubectl.
  7. Install a KinD cluster (optional)

Initialize the Pulumi Project

  1. Clone the repo:

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

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

    pulumi stack init dev
  4. Export the KinD kubeconfig to create the localProvider for it around its kubeconfig

    export KUBECONFIG="$(kind get kubeconfig-path --name="kind")" 
  5. Set the Pulumi configuration variables for the project.

    Note: Select any valid Kubernetes regions for the providers.

    pulumi config set aws:region us-west-2
    pulumi config set azure:location westus2
    pulumi config set gcp:zone us-west1-a 
    pulumi config set gcp:project pulumi-development
    pulumi config set accountIdRoot arn:aws:iam::<AWS_ACCOUNT_ID>:root (optional - only needed for EKS dev role and group demo)

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
pulumi stack output --show-secrets gkeKubeconfig > kubeconfig-gke.json
pulumi stack output localKubeconfig > kubeconfig-kind.json

<Choose a kubeconfig, then>

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 App and Production-Ready Kubernetes

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published