Setup lightweight Kubernetes with K3s

Peter Gillich
6 min readDec 19, 2020

K3s is a lightweight Kubernetes distribution, which looks like easy to install for devops, but not for dummies. This article gives answers for questions: How to solve install error? How to configure ingress? How to use dashboards? How to force Docker? How to use already installed kubectl?

K3s uses a built-in containerd as the container runtime, by default. This default setup has more advantages:

  • Docker is not needed.
  • If Docker is installed, the K3s containers and Docker containers are running in separated environment and cannot influence each other

Below description forces to use Docker to give opportunity for Docker experts to see what K3s makes under the hood. Of course, below example works without Docker, too (noticed at right place).

The default K3s ingress controller is Traefik, it’s not changed.

Used versions:

Tested on:

  • Ubuntu 16.04, bare metal (Intel Celeron N2830, 4 GB RAM)
  • Ubuntu 18.04, VM (12 GB RAM), running in Windows 10 Hyper-V

--

--

No responses yet