Create Demo Cluster
This page explains how to set up a local Kubernetes cluster with k3d.
Before you begin, this page assumes the following:
- You have helm installed on your machine
Install and Run k3d
Configure the container registry
Configure the container registry access as explained in this section.
Install k3d
- ECR
- GCR
Create the
registry_bin
folder andecr-credential-provider
file for the ECR Credential Provider service:mkdir -p registry_bintouch registry_bin/ecr-credential-providerchmod 755 registry_bin/ecr-credential-providerNow we can run a local Kubernetes cluster (update the path to
config.yaml
file, and the Kubernetes image tag version):k3d cluster create --image rancher/k3s:v1.26.11-k3s2 --k3s-arg "--disable=traefik,metrics-server@server:0" \-v $(pwd)/registry_bin:/var/lib/rancher/credentialprovider/bin@server:0 \-v $(pwd)/config.yaml:/var/lib/rancher/credentialprovider/config.yaml@server:0Now we need to install the ECR Credential Provider binary into the Kubernetes nodes. We will use a Kubernetes Job to do that:
apiVersion: batch/v1kind: Jobmetadata:name: cloud-provider-repository-binary-builderspec:backoffLimit: 0template:spec:restartPolicy: Nevercontainers:- name: ecr-credential-builderimage: alpine:3.18command:- /bin/sh- -c- |apk add -U ca-certificates tar zstd tzdata go gitgit clone https://github.com/kubernetes/cloud-provider-aws.gitcd cloud-provider-aws/cmd/ecr-credential-providerCGO_ENABLED=0 go build -mod=readonly .chmod 755 ecr-credential-providermkdir -p /mnt/host/var/lib/rancher/credentialprovider/bin/cp ecr-credential-provider /mnt/host/var/lib/rancher/credentialprovider/bin/volumeMounts:- mountPath: /mnt/hostname: hostvolumes:- hostPath:path: /type: ""name: hostYou can now move on the Qovery Helm deployment.
Check your cluster
- ECR
- GCR
Run the following command to check that your cluster is ready with your ECR credentials:
TODO
Next Steps
Congratulations! You have successfully created a Kubernetes cluster with k3d. You are now ready to install Qovery BYOK on your cluster. Next step: Install Qovery BYOK