k3d

Installation

k3d is a lightweight wrapper to run k3s (Rancher Lab’s minimal Kubernetes distribution) in docker.

k3d makes it very easy to create single- and multi-node k3s clusters in docker, e.g. for local development on Kubernetes.

Start a Cluster

  1. Create a cluster named mycluster with just a single server node:
> k3d cluster create mycluster
1
  1. Get the new cluster’s connection details merged into your default kubeconfig (usually specified using the KUBECONFIG environment variable or the default path $HOME/.kube/config) and directly switch to the new context:
> k3d kubeconfig merge mycluster --switch-context
1
  1. Use the new cluster with kubectl, e.g.:
> kubectl get svc
1

TIP

Now you have a working Kubernetes cluster running locally using K3d and have proper authentication using kubectl to connect to the cluster you can proceed to Kubernetic Installation guide.