Skip to content

K3S Rocks

k3s.rocks

Why?

Get started quickly with Kubernetes using K3S

Dockerswarm.rocks provides great instructions for quickly deploying with docker swarm. I thought there should be an equivalent guide for kubernetes. Kubernetes is also very popular and have some great features like Helm package manager and Operators

Kubernetes however, has a pretty steep learning curve, especially for self hosting.

Hosted cloud alternatives exists, and can be very practical, but they can also be costly and vendor specific. I wanted an alternative to docker swarm, that is (almost) as easy to self host and manage.

Docker Desktop Kubernetes is great to develop locally with kubernetes, in a replicable way.

K3S Lightweight Kubernetes is great to deploy your applications to production, in a distributed cluster, using the same files used by Docker Desktop Kubernetes locally.

Disclaimer

Using docker swarm will probably faster to learn and use more familiar terminology (if you are already using docker compose). Using kubernetes will require you to learn a huge new set of concepts, configurations, files, commands, etc. I recommend you also check out dockerswarm.rocks

A lot of commands in this guide are referring to manifest files and CLIs. If you want to run this anywhere close to production you should understand what all of these files and tools does and how they work first.

About K3S

Lightweight Kubernetes. Easy to install, half the memory, all in a binary of less than 100 MB. According to Ranchers its great for: Edge, IoT, CI, Development, ARM ,Embedding K8s and maybe most importantly:

  • Situations where a PhD in K8s clusterology is infeasible

You can set up a cluster in about In about an 60 minutes. (Depending on your setup, you might also want to read about Securing kubernetes)

If it doesn't work for you, then you can try a hosted kubernetes solution, or maybe try out docker swarm instead.

Single server

With K3S you can start with a "cluster" of a single server.

You can set it up, deploy your applications and do everything on a $5 USD/month server.

And then, when the time to grow comes, you can add more servers to the cluster.

With a small bunch of commands. Or a script.

And you can create your applications to be ready for massive scale from the beginning, starting from a single small server.

About K3S.rocks

This is not associated with Dockerswarm.rocks, Docker, K3S, Rancher, Kubernetes or any of the tools suggested here.

Its a personal project, gathering ideas, documentation and tools to use existing open source products efficiently together.

Prerequisites

Really you dont need to know much as you will mostly copy paste commands, but it would not hurt to know a little:

  • VPS
  • Linux
  • Docker
  • kubernetes

Sources

Some great sources I have used to put this together is:

CableSpaghetti
rpi4cluster.com
rancher.com
Traefik blog 1
Traefik blog 2