diff --git a/docs/development.md b/docs/development.md index b59a7a9c..73b9ea5c 100644 --- a/docs/development.md +++ b/docs/development.md @@ -91,3 +91,64 @@ The required binaries for `envtest` are installed with [`setup-envtest`](https:/ We are using Kubebuilder and `controller-gen` to build the needed CRDs. To generate the specs you can run `make build-crds`. Remember also to update the CRDs documentation running the `make docs` command. + +## How to install k3k on k3d + +This document provides a guide on how to install k3k on [k3d](https://k3d.io). + +### Installing k3d + +Since k3d uses docker under the hood, we need to expose the ports on the host that we'll then use for the NodePort in virtual cluster creation. + +Create the k3d cluster in the following way: + +```bash +k3d cluster create k3k -p "30000-30010:30000-30010@server:0" +``` + +With this syntax ports from 30000 to 30010 will be exposed on the host. + +### Install k3k + +Install now k3k as usual: + +```bash +helm repo update +helm install --namespace k3k-system --create-namespace k3k k3k/k3k --devel +``` + +### Create a virtual cluster + +Once the k3k controller is up and running, create a namespace where to create our first virtual cluster. + +```bash +kubectl create ns k3k-mycluster +``` + +Create then the virtual cluster exposing through NodePort one of the ports that we set up in the previous step: + +```bash +cat <