2019-08-13 16:48:06 -07:00
---
title: "Multicloud Kubernetes: Running Apps Across EKS, AKS, and GKE"
authors: ["mike-metral"]
Filter blog tags to Top 40, and add back some metadata (#350)
* Only show the top 40 blog tags
In https://github.com/pulumi/pulumi-hugo/pull/215, I had suggested
that instead of physically deleting tags we didn't want to show, we
compute it algorithmically, by only showing the "Top N" tags. This
commit introduces said functionality.
This has a few advantages:
* Preserves old metadata (the authors added the tags because they
felt they were meaningful and captured information about the posts).
* Enables us to surface those tags differently in the future (who
knows, maybe someday we'll want to run a "spinnaker" campaign).
* Notably, also keeps the tag index pages, which Google has indexed.
* Enables us to add a "View More ..." link at the bottom of the
page if folks want to see the entire list.
* Perhaps most importantly, protects against future bloat. For
example, since this tag cleanup happened, we have added top-level
tags for "aliases", "app-runner", "iam", "open-source", and
"refactoring", each of which has only a single post.
I chose 40 as the N in Top N, because that's how many we show today.
I could see an argument for filtering this based on post count
instead (e.g., only those with >3 posts).
* Add back some tags
Now that we filter out unpopular tags, we can add back some of the
ones previously removed.
2021-06-21 17:31:35 -07:00
tags: ["Kubernetes","aws", "azure", "google-cloud", "eks", "aks", "gke"]
2019-12-18 09:59:20 -08:00
meta_desc: "Run Kubernetes apps using a multicloud strategy. We'll walk through how to leverage multiple Kubernetes providers for deployments across AWS, Azure, and GCP."
2019-08-13 16:48:06 -07:00
date: "2019-08-14"
meta_image: "multicloud.png"
---
2020-03-19 10:03:34 -06:00
Kubernetes clusters from the managed platforms of AWS Elastic Kubernetes Service (EKS),
Azure Kubernetes Service (AKS), and GCP Google Kubernetes Engine (GKE) all vary in configuration, management, and resource
properties. This variance creates unnecessary complexity in cluster provisioning and application
2019-12-18 09:59:20 -08:00
deployments, as well as for CI/CD and testing.
2019-08-13 16:48:06 -07:00
2019-12-18 09:59:20 -08:00
Additionally, if you wanted to deploy the *same* app across multiple clusters
2019-08-13 16:48:06 -07:00
for specific use cases or test scenarios across providers, subtleties
2019-08-13 19:52:45 -07:00
such as LoadBalancer outputs and cluster connection settings can be a nuisance
2019-08-13 16:48:06 -07:00
to manage.
In this post, we'll see how to use Pulumi to deploy the `kuard` app across EKS,
AKS, GKE and a local Kubernetes cluster, such as Docker Desktop or a self-managed cluster.
We'll spin up the clusters in each provider, launch the app,
and manage both cluster and app using the TypeScript programming language.
<!-- more -->
[View the full example and code.][multicloud-example]
< center > < / center >
## Cluster Provisioning
Provisioning Kubernetes **clusters** and their IaaS resources is made simple
through Pulumi's various SDKs for the cloud providers:
- AWS: [`pulumi/eks` ](https://github.com/pulumi/eks )
- GCP: [`pulumi/gcp` ](https://github.com/pulumi/gcp )
- Azure: [`pulumi/azure` ](https://github.com/pulumi/pulumi-azure )
[Crosswalk for AWS][crosswalk-aws] further allows us to leverage the Pulumi
libraries of common infrastructure for AWS to simplify cloud resource
instantiation and management while gaining best-practices as defaults.
Check out the [`pulumi/awsx` ](https://github.com/pulumi/pulumi-awsx ) SDK to get
started.
For local clusters such as those that are self-managed, or provisioned by a
2019-08-13 19:52:45 -07:00
tool like Docker Desktop, Pulumi can still deploy workloads to these these
2019-08-13 16:48:06 -07:00
systems given that the [`pulumi/kubernetes` ][pulumi-kubernetes] workload SDK only requires a valid `kubeconfig`
2022-10-26 07:22:15 -07:00
file. For more information on Pulumi's Kubernetes support, check out the [Kubernetes reference page ](/registry/packages/kubernetes/ ).
2019-08-13 16:48:06 -07:00
We will use the cloud SDKs to provision the managed Kubernetes clusters. Given
2019-12-18 09:59:20 -08:00
that we're working with real code, we are afforded developer benefits such as:
2019-08-13 19:52:45 -07:00
code linting, type checking, IDE hints and completion,
abstractions and inheritance.
2019-08-13 16:48:06 -07:00
Leveraging these development features creates the opportunity to encapsulate
the finer-grained details and settings, and expose the capability to create
2019-08-13 19:52:45 -07:00
clusters as simple as the following code:
2019-08-13 16:48:06 -07:00
2019-12-18 09:59:20 -08:00

2019-08-13 16:48:06 -07:00
## Workload Deployment
Once the clusters are provisioned, we can leverage the
[`pulumi/kubernetes` ][pulumi-kubernetes] SDK to manage the Kubernetes
**workloads** that will be deployed into the clusters.
The `pulumi/kubernetes` SDK uses the official Kubernetes [client-go][client-go]
library to interact with Kubernetes. Therefore, Pulumi can work pretty
much anywhere `kubectl` works, even if Pulumi was not used to create the cluster.
2019-12-18 09:59:20 -08:00

2019-08-13 16:48:06 -07:00
## Summary
As shown in the code samples, it becomes relatively easy to provision and
2020-03-19 10:03:34 -06:00
manage Kubernetes clusters across multiple clouds, as well as deploy workloads to the cluster
2019-08-13 16:48:06 -07:00
regardless if they are managed by a cloud provider, or self-managed.
2019-12-18 09:59:20 -08:00
The various SDKS allow you to leverage industry standard best-practices and
2019-08-13 16:48:06 -07:00
defaults, in addition to allowing you to further configure and customize how your clusters
and apps are managed.
2019-08-13 19:52:45 -07:00
Testing apps across various providers in this form allows you to abstract away
2019-08-13 16:48:06 -07:00
the details of provider specific implementations, and focus on how your app
operates in the various contexts.
## Learn More
If you'd like to learn about Pulumi and how to manage your
2023-06-16 14:10:53 -07:00
infrastructure and Kubernetes multi-cloud capabilities through code, [get started today ](/docs/get-started/ ). Pulumi is open source and free to
2019-08-13 16:48:06 -07:00
use.
For further examples on how to use Pulumi to create Kubernetes
clusters, or deploy workloads to a cluster, check out the rest of the
2022-10-26 07:22:15 -07:00
[Kubernetes tutorials ](/registry/packages/kubernetes/how-to-guides/ ).
2019-08-13 16:48:06 -07:00
As always, you can check out our code on
[GitHub ](https://github.com/pulumi ), follow us on
[Twitter ](https://twitter.com/pulumicorp ), subscribe to our [YouTube
channel](https://www.youtube.com/channel/UC2Dhyn4Ev52YSbcpfnfP0Mw), or
join our [Community Slack ](https://slack.pulumi.com/ ) channel if you have
any questions, need support, or just want to say hello.
If you'd like to chat with our team, or get hands-on assistance with
2022-10-26 07:22:15 -07:00
migrating your existing configuration code to Pulumi, please don't hesitate to [drop us a line ](/contact/ ).
2019-08-13 16:48:06 -07:00
We also encourage you to watch Pulumi team member [Levi Blackstone][levi-blackstone]
demo this post in an episode of the [Kubernetes Community Meeting ](https://kubernetes.io/community ).
2019-08-13 19:52:45 -07:00
{{< youtube " EyW2m5Xa_BQ ? rel = 0&start=67" > }}
2019-08-13 16:48:06 -07:00
2019-12-19 11:45:43 -08:00
<!-- markdownlint - disable url -->
[multicloud-example]: https://github.com/pulumi/examples/tree/master/kubernetes-ts-multicloud
2022-10-26 07:22:15 -07:00
[levi-blackstone]: /blog/author/levi-blackstone/
2019-12-19 11:45:43 -08:00
[pulumi-kubernetes]: https://github.com/pulumi/pulumi-kubernetes
[client-go]: https://github.com/kubernetes/client-go
2023-05-15 15:25:28 -07:00
[crosswalk-aws]: /docs/clouds/aws/guides/
2019-12-19 11:45:43 -08:00
<!-- markdownlint - enable url -->