Skip to content

k3s - Lightweight Kubernetes inside a Docker-in-Docker container

License

Notifications You must be signed in to change notification settings

orlangure/k3s-dind

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

84 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

k3s-dind

Lightweight k3s Kubernetes inside a Docker-in-Docker container.

This is a fork adapted to be used by Gnomock: it supports hostname/port configuration and exposes kubeconfig file over HTTP for easier programmatic access.

Quick Start

docker run --rm --name k3s --privileged \
    -p 28888:80 \
    -p 48443:48443 \
    -e K3S_API_HOST=localhost \
    -e K3S_API_PORT=48443 \
    orlangure/k3s
curl localhost:28888/kubeconfig > kubeconfig
export KUBECONFIG=./k3sconfig

kubectl get nodes
NAME      STATUS    ROLES     AGE       VERSION
k3s       Ready     <none>    1m        v1.14.1-k3s.4

kubectl create ...

What is k3s-dind?

k3s-dind allows you to quickly create a lightweight local Kubernetes cluster, self-contained inside a single Docker-in-Docker (DinD) container.

What would I use it for?

k3s-dind is awesome for:

  • Quickly running automated unit tests in Kubernetes
  • Running your containerized app locally for easier debugging
  • Testing out automation or changes to a Kubernetes cluster
  • Ensuring you're starting with a fresh cluster every time
  • Doing all that stuff in only 512MB of RAM!

You made Kubernetes that small??

Nope! The awesome folks over at Rancher Labs did all the hard work of creating k3s. We just packaged it into a Docker-in-Docker container.

About

k3s - Lightweight Kubernetes inside a Docker-in-Docker container

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Shell 63.3%
  • Dockerfile 25.0%
  • Go 11.7%