Kubernetes

K8s at home – Top distros for labs and learning

K8s at home - Top distros for labs and learning. Learn about hosting K8s at home and why running Kubernetes at home is awesome

Highlights

  • Running Kubernetes at home is a great way to learn more about K8s and run real workloads to get a feel for how you can run containers in a highly-available way.
  • An ingress controller allows providing certificates for HTTPs, and routing incoming visit requests to the correct service hosted in the Kubernetes cluster, depending on the values in the ingress path routes.
  • Kubernetes is run in a cluster configuration to support losing a node and still having the capacity to run your workloads.

Running Kubernetes at home is a great way to learn more about K8s and run real workloads to get a feel for how you can run containers in a highly-available way. All are great for learning, no matter what configuration you choose or what Kubernetes distro you start with. Nothing says you have to stick with a single Kubernetes solution. You can spin up and try multiple Kubernetes solutions to run pods at home. Let’s look at great K8s at home solutions for learning, labbing, and running workloads.

What is Kubernetes, and why run it at home?

Kubernetes is a container orchestration solution that is the de facto standard for running Kubernetes in production. Docker containers in themselves are not highly available and need a way to run in an orchestrated configuration where they can be highly available, scalable, and elastic.

Below is a look at the historic application infrastructure and what things looked like.

Kubernetes via VMware Tanzu as an example of a modern Kubernetes platform.

High availability

Kubernetes provides that solution allowing you to achieve the goal of running your containers like you would in production or in a cloud environment. Kubernetes is run in a cluster configuration to support losing a node and still having the capacity to run your workloads.

Architecture

Kubernetes clusters are made up of controller nodes and worker nodes. The control nodes host the control and management plane for the cluster and the API endpoint for interacting with the cluster programmatically.

Learning

One of the great benefits of running K8s at home is learning. With a home lab environment, you can run Kubernetes and not worry about an error or required uptime. You can learn at your own pace, look at annotations, refer to documentation, set goals, mount different types of storage and play around with these configurations enabled in the cluster, and experiment.

Secrets

With Kubernetes you can store secrets. Kubernetes Secrets are stored unencrypted in the API server’s underlying data store (etcd). Anyone can retrieve a secret via a key value store, so take note of permissions when working with secrets and keeping these safe. Enable role based access control to further protect resources in Kubernetes.

How you install containers in Kubernetes

One of the easiest ways to install containers in Kubernetes is using helm. You can think of helm as a package manager for Kubernetes. It makes pulling down common containers extremely easy.

Adding helm repository

You add your helm repository and then pull the container you want to pull using what helm refers to as a chart, which is essentially a template. The helm charts define the configuration for the container image you are pulling.

Self-hosted services

You can host your services using Kubernetes, even if you are doing this in a self-hosted way. When looking at K8s at home, most prefer to self-host web services, HTTPS, ingress path configurations, and other components for their project.

Configure ingress settings

One of the challenges with learning Kubernetes is understanding how to expose services. There are various ways to do this. However, an organization generally exposes services using an ingress controller in production deployment configurations.

Certificates and configure ingress settings

An ingress controller allows providing certificates for HTTPs, and routing incoming visit requests to the correct service hosted in the Kubernetes cluster, depending on the values in the ingress path routes.

Below we have a service hosted on an internal IP and we have the IP exposed on a loadbalancer address. However, if we didn’t want to expose the port on a loadbalancer IP, we can use an ingress path to the application. The hosts then route the traffic accordingly.

Below, we are using the Traefik ingress controller to expose a service hosted internally in the Kubernetes cluster.

K8s at home – top distros to work with

What are some top Kubernetes distros to work with using K8s at home? There are a few to mention. These include the following:

K8S at home FAQs

Let’s consider a few FAQs with Kubernetes at home:

Why run Kubernetes at home?

There are many reasons for this, including self-hosting services, highly-available containers, and learning.

What are the best distributions for running K8s at home?

There are many to choose from, including:

  • Minikube

  • Microk8s

  • Tanzu community edition

  • Rancher desktop

  • and K3s

Fixes to app access?

You can provide app access using ingress controllers without the need to expose all services via a loadbalancer IP address.

Wrapping Up

Running K8s at home is awesome, in terms of learning, hosting services, and running containers in a high-availability configuration. Hopefully this quick guide helps any considering self-hosting services at home with Kubernetes.

Subscribe to VirtualizationHowto via Email 🔔

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Brandon Lee

Brandon Lee is the Senior Writer, Engineer and owner at Virtualizationhowto.com and has over two decades of experience in Information Technology. Having worked for numerous Fortune 500 companies as well as in various industries, Brandon has extensive experience in various IT segments and is a strong advocate for open source technologies. Brandon holds many industry certifications, loves the outdoors and spending time with family.

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.