K3d configuration should use a config file
https://k3d.io/v5.0.1/usage/configfile/
To create cluster :
k3d cluster create eole3 --config eole3.yaml
Example of eole3.yaml
file to have the same as provisionner actually does
apiVersion: k3d.io/v1alpha5 # this will change in the future as we make everything more stable
kind: Simple # internally, we also have a Cluster config, which is not yet available externally
servers: 3 # same as `--servers 1`
agents: 2 # same as `--agents 2`
kubeAPI: # same as `--api-port myhost.my.domain:6445` (where the name would resolve to 127.0.0.1)
host: "k3d.eole3.ac-test.fr" # important for the `server` setting in the kubeconfig
hostPort: "6445" # where the Kubernetes API listening port will be mapped to on your host system
image: rancher/k3s:v1.27.7-k3s2 # same as `--image rancher/k3s:v1.20.4-k3s1`
volumes: # repeatable flags are represented as YAML lists
- volume: /srv/k3d/storage:/storage # same as `--volume '/my/host/path:/path/in/node@server:0;agent:*'`
nodeFilters:
- server:*
- agent:*
ports:
- port: 80:80 # same as `--port '80:80@loadbalancer'`
nodeFilters:
- loadbalancer
- port: 443:443 # same as `--port '443:443@loadbalancer'`
nodeFilters:
- loadbalancer
options:
k3d: # k3d runtime settings
wait: true # wait for cluster to be usable before returining; same as `--wait` (default: true)
timeout: "60s" # wait timeout before aborting; same as `--timeout 60s`
disableLoadbalancer: false # same as `--no-lb`
disableImageVolume: false # same as `--no-image-volume`
disableRollback: false # same as `--no-Rollback`
loadbalancer:
configOverrides:
- settings.workerConnections=2048
k3s: # options passed on to K3s itself
extraArgs: # additional arguments passed to the `k3s server|agent` command; same as `--k3s-arg`
- arg: --disable=traefik
nodeFilters:
- server:*
Edited by Barconnière Fabrice