Skip to content

Fifty Things you can do with Kubernetes #494

@garritfra

Description

@garritfra

Kubernetes is often regarded as the personification of software complexity. But through multiple years of using Kubernetes on and off, I actually think that it's a very solid and clean piece of software.

In this post, I will explore fifty things you can do with Kubernetes, maybe also beyond what you would expect from this tool.

The "Make 50 of Something" technique

I first heard of the "Make 50 of Something" technique through blinry's post Fifty Things you can do with a Software Defined Radio 📻, and I was really intreagued by the idea.

What is Kubernetes?

Kubernetes was built to solve one problem: how do I run m containers across n servers? It's essentially an operating system for computer clusters. It makes it easy to deploy, scale and manage containerized applications.

Let's make Fifty Things with Kubernetes!

1: Spin up a cluster

There are many different ways to spin up Kubernetes clusters. You can go all in with a managed cloud offering like GKE (Google Kubernetes Engine) or AWS EKS (Elastic Kubernetes Service), but those services will set you back a significant amount of money. There's also projects like k3s or microk8s, with make it really easy to run Kubernetes on embedded machines like a Raspberry Pi (though they run just as fine on regular servers as well).

The method I want to focus on in this post however is Kind. Using Kind is easier than any of the tools mentioned above. It uses a container runtime like Docker to spin up a cluster right on your local machine, without any fuzz.

Just install Kind through Brew (or any other package manager of your choice):

brew install kind

Now, you can use the kind CLI to spin up a new cluster!

➜  50things-kubernetes git:(main) kind create cluster -n 50things
Creating cluster "50things" ...
 ✓ Ensuring node image (kindest/node:v1.29.2) 🖼
 ✓ Preparing nodes 📦
 ✓ Writing configuration 📜
 ✓ Starting control-plane 🕹️
 ✓ Installing CNI 🔌
 ✓ Installing StorageClass 💾
Set kubectl context to "kind-50things"
You can now use your cluster with:

kubectl cluster-info --context kind-50things

Have a nice day! 👋

Running the suggested command shows some information about the running cluster:

➜  50things-kubernetes git:(main) kubectl cluster-info --context kind-50things
Kubernetes control plane is running at https://127.0.0.1:52613
CoreDNS is running at https://127.0.0.1:52613/api/v1/namespaces/kube-system/services/kube-dns:dns/proxy

To further debug and diagnose cluster problems, use 'kubectl cluster-info dump'.

docker ps will list all running docker containers. You will see that a new control plane has been created:

➜  50things-kubernetes git:(main) docker ps
CONTAINER ID   IMAGE                  COMMAND                  CREATED         STATUS         PORTS                       NAMES
0d55877ea284   kindest/node:v1.29.2   "/usr/local/bin/entr…"   2 minutes ago   Up 2 minutes   127.0.0.1:52613->6443/tcp   50things-control-plane

Congrats, this is your very first Kubernetes cluster!

2: Deploying a container

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions