k3s is the lightweight Kubernetes distribution by Rancher: k3s-io/k3s
k3d creates containerized k3s clusters. This means, that you can spin up a multi-node k3s cluster on a single machine using docker.
Note: k3d is a community-driven project but it's not an official Rancher (SUSE) product. Sponsoring: To spend any significant amount of time improving k3d, we rely on sponsorships:
| Platform | Stage | Version | Release Date | Downloads so far |
|---|---|---|---|---|
| GitHub Releases | stable | |||
| GitHub Releases | latest | |||
| Homebrew | stable | - | - | |
| Chocolatey | stable | - | - | |
| Scoop | stable | - | - |
You have several options there:
wget -q -O - https://raw.githubusercontent.com/k3d-io/k3d/main/install.sh | bashcurl -s https://raw.githubusercontent.com/k3d-io/k3d/main/install.sh | bashTAG environment variable):wget -q -O - https://raw.githubusercontent.com/k3d-io/k3d/main/install.sh | TAG=v5.0.0 bashcurl: curl -s https://raw.githubusercontent.com/k3d-io/k3d/main/install.sh | TAG=v5.0.0 bash
use Homebrew: brew install k3d (Homebrew is available for MacOS and Linux)
sudo port selfupdate && sudo port install k3d (MacPorts is available for MacOS)yay -S rancher-k3d-bingo install github.com/k3d-io/k3d/v5@latest (Note: this will give you unreleased/bleeding-edge changes)choco install k3d (Chocolatey package manager is available for Windows)scoop install k3d (Scoop package manager is available for Windows)or...
git clone git@github.com:k3d-io/k3d.git or go get github.com/k3d-io/k3d/v5@mainmake build to build for your current systemgo install to install it to your GOPATH (Note: this will give you unreleased/bleeding-edge changes)make build-cross to build for all systemsCheck out what you can do via k3d help or check the docs @ k3d.io
Example Workflow: Create a new cluster and use it with kubectl
k3d cluster create CLUSTER_NAME to create a new single-node cluster (= 1 container running k3s + 1 loadbalancer container)k3d kubeconfig merge CLUSTER_NAME --kubeconfig-switch-context to update your default kubeconfig and switch the current-context to the new onekubectl get pods --all-namespacesk3d cluster delete CLUSTER_NAME to delete the default clusterThis repository is based on @zeerorg's zeerorg/k3s-in-docker, reimplemented in Go by @iwilltry42 in iwilltry42/k3d, which got adopted by Rancher in rancher/k3d and was now moved into its own GitHub organization at k3d-io/k3d.
k3d is a community-driven project and so we welcome contributions of any form, be it code, logic, documentation, examples, requests, bug reports, ideas or anything else that pushes this project forward.
Please read our Contributing Guidelines and the related Code of Conduct.
You can find an overview of the k3d project (e.g. explanations and a repository guide) in the documentation: k3d.io/stable/design/project/
Thanks goes to these wonderful people (emoji key):