/k3d

Configs to create a k3d clusters

Primary LanguageMustache

k3d

Description

Install a k3s Kubernetes cluster with k3d.

Create cluster

k3d cluster create mycluster --config k3d.yaml

Apply the Storage class

kub apply -f storageclass.yaml

Label the nodes

 kub label node k3d-mycluster-agent-1 nodetype=standard
 kub label node k3d-mycluster-agent-0 nodetype=pod

Start/Stop the cluster

Once the cluster is created it will run and will restart when your PC is restarted.

Start

k3d cluster start mycluster

Stop

k3d cluster stop mycluster

Disable Traefik

k3d cluster create mycluster --config k3d.yaml --k3s-arg "--disable=traefik@server:0" 
Replace Traefik with Nginx
helm upgrade --install ingress-nginx ingress-nginx --repo https://kubernetes.github.io/ingress-nginx   --namespace ingress-nginx --create-namespace -f nginx-values.yaml  --version=v3.29.0

Kubernetes Cluster Help

To add DNS records to a cluster's coredns follow the instructions here:

https://coredns.io/2017/05/08/custom-dns-entries-for-kubernetes/