Little helper to run CNCF's k3s in Docker
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
k3d/pkg/config/test_assets/config_test_simple.yaml

79 lines
2.1 KiB

apiVersion: k3d.io/v1alpha5
kind: Simple
metadata:
name: test
servers: 1
agents: 2
kubeAPI:
hostIP: "0.0.0.0"
hostPort: "6443"
image: rancher/k3s:latest
volumes:
- volume: /my/path:/some/path
nodeFilters:
- all
ports:
- port: 80:80
nodeFilters:
- loadbalancer
- port: 0.0.0.0:443:443
nodeFilters:
- loadbalancer
env:
- envVar: bar=baz
nodeFilters:
- all
files:
- source: |
apiVersion: v1
kind: Namespace
metadata:
name: foo
destination: /var/lib/rancher/k3s/server/manifests/foo.yaml
# destination: "Source: Embedded content in k3d config file, Destination: Absolute path, Description: Not defined"
- source: |
apiVersion: v1
kind: Namespace
metadata:
name: bar
destination: k3s-manifests/bar.yaml # Resolved to /var/lib/rancher/k3s/server/manifests/bar.yaml
description: 'Source: Embedded content in k3d config file, Destination: Magic shortcut path, Description: Defined'
- source: baz-ns.yaml
destination: k3s-manifests-custom/baz.yaml # Resolved to /var/lib/rancher/k3s/server/manifests/custom/bar.yaml
description: 'Source: Relative path to k3d config file, Destination: Magic shortcut path, Description: Defined'
- source: baz-ns.yaml
destination: k3s-manifests-custom/baz-server.yaml # Resolved to /var/lib/rancher/k3s/server/manifests/custom/bar-server.yaml
nodeFilters:
- "server:*"
description: 'Source: Relative path to k3d config file, Destination: Magic shortcut path, Node: Defined, Description: Defined'
options:
k3d:
wait: true
timeout: "60s"
disableLoadbalancer: false
disableImageVolume: false
k3s:
extraArgs:
- arg: --tls-san=127.0.0.1
nodeFilters:
- server:*
nodeLabels:
- label: foo=bar
nodeFilters:
- server:0
- loadbalancer
kubeconfig:
updateDefaultKubeconfig: true
switchCurrentContext: true
runtime:
labels:
- label: foo=bar
nodeFilters:
- server:0
- loadbalancer
ulimits:
- name: nofile
soft: 1024
hard: 1024