How to Install and Use K3D
Last updated
Was this helpful?
Last updated
Was this helpful?
I have discovered K3D a bit late but it is one of the best tools for local Kubernetes development It does not run your Kubernetes cluster inside a virtual machine just like Minikube does. It uses Docker and allows you to create multi-node clusters. You may want to check page for more information.
I created a to install and configure K3D for my local Kubernetes development and also added some sample deployments with ingress service.
Docker and Helm need to be installed in your local development environment. Please do not proceed with the installation before installing and .
I followed the official documentation to installK3D
on my local development environment but made a few changes. I skipped the deployment of Traefik because K3D
install V1 and I wanted to install the latest version of Traefik
. You can also prefer another ingress controller like nginx
.
You can install the environment by running a single script - deploy-cluster.sh
and the script itself is quite self-explanatory:
You can check one of the example deployments in the main project directory and apply it via kubectl apply -f <sample-directory>
command. If you do not edit anything in the YAML
definitions, it will create a host-based ingress rule for the deployment. If you check the Traefik HTTP services, you will find your rule as below:
Example deployment output will look like this:
You may want to change the global variables for your own environment. Once the script is running you can check the Traefik Dashboard by visiting .