-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathk3d.yaml
118 lines (118 loc) · 5.46 KB
/
k3d.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
# k3d configuration file, saved as e.g. /home/me/myk3dcluster.yaml
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
metadata:
# Don't overwrite section name. RMK set automatically.
name: ${K3D_NAME} # name that you want to give to your cluster (will still be prefixed with `k3d-`)
servers: 1 # same as `--servers 1`
agents: 0 # same as `--agents 2`
kubeAPI: # same as `--api-port myhost.my.domain:6445` (where the name would resolve to 127.0.0.1)
# host: "myhost.my.domain" # important for the `server` setting in the kubeconfig
hostIP: "0.0.0.0" # where the Kubernetes API will be listening on
hostPort: "6445" # where the Kubernetes API listening port will be mapped to on your host system
image: rancher/k3s:v1.29.8-k3s1 # same as `--image rancher/k3s:v1.29.8-k3s1`
#network: my-custom-net # same as `--network my-custom-net`
#subnet: "172.28.0.0/16" # same as `--subnet 172.28.0.0/16`
#token: superSecretToken # same as `--token superSecretToken`
volumes: # repeatable flags are represented as YAML lists
# Don't overwrite the "volume" section. RMK configures it automatically.
- volume: ${K3D_VOLUME_HOST_PATH}:/mnt/k3d/node # same as `--volume '/my/host/path:/path/in/node@server:0;agent:*'`
nodeFilters:
- all
# - volume: ${K3D_REGISTRY_HOST_PATH}:/etc/rancher/k3s # same as `--volume '/my/host/path:/path/in/node@server:0;agent:*'`
# nodeFilters:
# - all
ports:
- port: 8080:80 # same as `--port '8080:80@loadbalancer'`
nodeFilters:
- loadbalancer
- port: 8443:443 # same as `--port '8443:443@loadbalancer'`
nodeFilters:
- loadbalancer
- port: 9111:9000 # same as `--port '9111:9000@loadbalancer'`
nodeFilters:
- loadbalancer
#env:
# - envVar: bar=baz # same as `--env 'bar=baz@server:0'`
# nodeFilters:
# - server:0
files:
- description: 'Source: Relative, Destination: Absolute path, Node: Servers only'
source: helm-chart-config/traefik-config.yaml
destination: /var/lib/rancher/k3s/server/manifests/traefik-config.yaml
nodeFilters:
- server:0
# - description: 'Source: Embedded, Destination: Magic shortcut path'
# source: |
# apiVersion: v1
# kind: Namespace
# metadata:
# name: foo
# destination: k3s-manifests-custom/foo.yaml # Resolved to /var/lib/rancher/k3s/server/manifests/custom/foo.yaml
#registries: # define how registries should be created or used
# create: # creates a default registry to be used with the cluster; same as `--registry-create registry.localhost`
# name: registry.localhost
# host: "0.0.0.0"
# hostPort: "5001"
# proxy: # omit this to have a "normal" registry, set this to create a registry proxy (pull-through cache)
# remoteURL: https://registry-1.docker.io # mirror the DockerHub registry
# username: "" # unauthenticated
# password: "" # unauthenticated
# volumes:
# - /some/path:/var/lib/registry # persist registry data locally
# use:
# - k3d-myotherregistry:5000 # some other k3d-managed registry; same as `--registry-use 'k3d-myotherregistry:5000'`
# Don't overwrite the "config" section. RMK configures it automatically.
# config: | # define contents of the `registries.yaml` file (or reference a file); same as `--registry-config /path/to/config.yaml`
# mirrors:
# "288509344804.dkr.ecr.eu-north-1.amazonaws.com":
# endpoint:
# - https://288509344804.dkr.ecr.eu-north-1.amazonaws.com
# configs:
# 288509344804.dkr.ecr.eu-north-1.amazonaws.com:
# auth:
# username: ${K3D_AWS_ECR_USER}
# password: ${K3D_AWS_ECR_PASSWORD}
#hostAliases: # /etc/hosts style entries to be injected into /etc/hosts in the node containers and in the NodeHosts section in CoreDNS
# - ip: 1.2.3.4
# hostnames:
# - my.host.local
# - that.other.local
# - ip: 1.1.1.1
# hostnames:
# - cloud.flare.dns
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: --kubelet-arg=--sync-frequency=5s
nodeFilters:
- all
- arg: --kubelet-arg=--file-check-frequency=5s
nodeFilters:
- all
# nodeLabels:
# - label: foo=bar # same as `--k3s-node-label 'foo=bar@agent:1'` -> this results in a Kubernetes node label
# nodeFilters:
# - agent:1
kubeconfig:
updateDefaultKubeconfig: true # add new cluster to your default Kubeconfig; same as `--kubeconfig-update-default` (default: true)
switchCurrentContext: true # also set current-context to the new cluster's context; same as `--kubeconfig-switch-context` (default: true)
# runtime: # runtime (docker) specific options
# gpuRequest: all # same as `--gpus all`
# labels:
# - label: bar=baz # same as `--runtime-label 'bar=baz@agent:1'` -> this results in a runtime (docker) container label
# nodeFilters:
# - agent:1
# ulimits:
# - name: nofile
# soft: 65535
# hard: 65535