Choosing how and where to run containers

When choosing a container orchestration platform to run containers, we'll discover many options in the Kubernetes space. There are various distributions of Kubernetes to address a variety of scenarios, which are provided through different channels.

Running Kubernetes in the cloud

The complexity of establishing a Kubernetes cluster leads many organizations to choose a managed Kubernetes service made available by a cloud provider. These services allow clusters to be quickly provisioned with preconfigured security, networking, and monitoring. When provisioning these clusters, organizations may choose the size and number of worker nodes underlying the cluster that fit their requirements. Conveniently, the worker node configurations can later be adjusted and scaled as teams learn more about the workloads they operate on the cluster. All major cloud providers offer some form of managed Kubernetes service. For example, Azure provides the AKS for organizations looking to quickly get started with a cluster.

Running Kubernetes on-premise

Other organizations may choose to host their Kubernetes cluster on-premise. In this model, the organization is responsible for provisioning the cluster and configuring it for concerns such as security and monitoring, as well as providing resources like computing and networking. In these scenarios, it is common to leverage a packaged Kubernetes offering such as Red Hat Openshift, a proprietary Kubernetes distribution that organizations may choose to purchase.

Running Kubernetes for development purposes

For developers looking to experiment with Kubernetes, there are several tools that quickly create a small-scale cluster. These Kubernetes distributions allow developers to easily run a cluster on their local workstation and handle its configuration. In some situations, these small scale Kubernetes clusters are ideal for use cases where Kubernetes needs to be run on an edge device or in disconnected scenarios.

There are several options for developers in this space including:

  • K3s

  • kind

  • minikube

For this course, we'll be using a small K3s cluster, which we've already interacted with in previous course exercises.

Provisioning a Kubernetes cluster

In this exercise, we'll provision a small K3s Kubernetes cluster within the interactive widget below. To build the cluster, enter the commands in the exercise into the interactive terminal.

Working with k3d

k3d is a small command line tool that is useful for provisioning k3s Kubernetes clusters. The tool is already installed within the interactive widget, so we can begin to explore how it is used. A great place to start is by viewing the commands that k3d provides by executing the help command within the interactive terminal.

Get hands-on with 1400+ tech skills courses.