Why and How to Run Kubernetes On-Premises

While Kubernetes is a cloud-native platform, it doesn’t have to run in the cloud. On the contrary, Kubernetes can run on-premises just as well as it can in the cloud – and depending on your needs, deploying Kubernetes on-premises may be preferable to cloud-based Kubernetes.

On-premises Kubernetes is a Kubernetes environment in which the host infrastructure for your clusters is privately owned, as opposed to public cloud servers. The Kubernetes management software also is typically hosted on private infrastructures, although that’s not the case if you use a solution like EKS Anywhere (which lets you operate clusters on private infrastructure but keeps the control plane in the AWS cloud).

This article explains why you may or may not want to deploy Kubernetes on-premises. It also discusses different ways to set up an on-premises Kubernetes cluster.

Advantages of on-premises Kubernetes

Compared to cloud-based Kubernetes, Kubernetes on-premises offers the following benefits:

  • Security: On-premises clusters can be isolated from the public cloud to a greater extent than cloud-based clusters. In some cases, you can even “air gap” your on-premises clusters, which means disconnecting them from the Internet entirely. In these ways, on-premises Kubernetes reduces the risk of attack to a certain extent.
  • Compliance: Similarly, on-premises Kubernetes may make it easier to satisfy compliance mandates that require sensitive data or applications to reside on private infrastructure instead of in the public cloud.
  • Cost: Although on-premises Kubernetes isn’t always less costly, your total cost of ownership may be lower because you won’t need to pay public cloud infrastructure costs. Of course, you’ll need to factor in the cost of the staff time required to manage on-premises infrastructure in order to determine whether on-premises is ultimately less costly than the cloud. In addition, on-premises Kubernetes can reduce the data egress fees that you pay if you move data out of cloud-based Kubernetes clusters.

For these reasons, on-premises Kubernetes is a good approach for use cases where security and privacy are priorities, or where you already have a large on-premises infrastructure in place (along with sufficient operations staff and expertise) and you want to host Kubernetes clusters on it instead of paying for public cloud servers.

Drawbacks of on-premises Kubernetes

On the other hand, running Kubernetes on-premises is certainly not ideal for every use case. The main disadvantages include:

  • Less scalability: On-premises clusters can only scale up (which means adding more nodes) if you have additional private infrastructure available to scale them with. Likewise, if you want to scale down, you may be left with on-premises servers that you are no longer actively using, which is financially wasteful. In the public cloud, there are virtually no constraints on infrastructure scalability.
  • Fewer integrations: In some cases, it’s more difficult to take advantage of integrations with public cloud services when you run Kubernetes on-premises. Note, however, that there are exceptions; for instance, EKS Anywhere lets you leverage the same AWS cloud integrations that are available for cloud-based Kubernetes clusters, even if your clusters run on-premises.
  • Lower resiliency: In general, public clouds achieve higher availability rates than privately managed infrastructure. Public clouds also offer more features (like the ability to spread workloads across different availability zones or regions, which is hard to achieve in private infrastructure unless you have a large set of data centers to choose from) that can increase resilience. By extension, cloud-based Kubernetes clusters are generally more resilient and reliable than on-premises alternatives.
  • Setup complexity: It may be more difficult to set up and manage Kubernetes on-premises because you need to provision the infrastructure yourself.

If you want the simplest, most reliable and most scalable Kubernetes environment, then, on-premises Kubernetes may not be the best approach.

3 ways to run Kubernetes on-premises

There are several ways to go about setting up Kubernetes on-premises.

1. Self-managed clusters

First, you can set up and manage a cluster yourself using an open source Kubernetes distribution. This approach gives you maximum control over how your Kubernetes environment is configured, and you won’t pay anything for the Kubernetes software.

However, this is the hardest way to set up an on-premises cluster. If you lack deep Kubernetes expertise, self-managed clusters may not be worth the effort.

2. Infrastructure-agnostic Kubernetes distributions

A number of commercial Kubernetes distributions are designed to be infrastructure-agnostic and can run on-premises in addition to the public cloud. Examples include Rancher and Platform9.

The advantage of using one of these distributions is that setup is easier than a self-managed Kubernetes environment. However, you’ll generally have to pay for the software (although it may be free in small-scale environments) and you’ll be limited to whichever configuration options and tooling your distribution supports.

3. Cloud-based Kubernetes distributions that support on-premises

Some cloud vendors offer Kubernetes services that can deploy and manage clusters on-premises, even though the services themselves are hosted in the public cloud. Examples include Google Kubernetes Engine (GKE) and EKS Anywhere, the on-premises deployment option for Amazon Web Services’s Elastic Kubernetes Service (EKS) distribution.

These distributions offer easy setup. In addition, because the control plane for your clusters remains in the public cloud, you don’t need to worry as much about failures within the management tooling. And, with a solution like EKS Anywhere, you can use the same Kubernetes management tools and integrations (including for tools like JFrog Artifactory) for your on-premises clusters as you can for cloud-based clusters.

The drawbacks to this approach include dependence on a specific public cloud and its tooling to manage your clusters. There may also be costs associated with the Kubernetes distribution, although EKS Anywhere is currently free.