In the documentation it says that
Any Kubernetes manifests found in
/var/lib/rancher/k3s/server/manifests
will automatically be deployed to K3s in a manner similar tokubectl apply
. Manifests deployed in this manner are managed as AddOn custom resources, and can be viewed by runningkubectl get addon -A
. You will find AddOns for packaged components such as CoreDNS, Local-Storage, Traefik, etc. AddOns are created automatically by the deploy controller, and are named based on their filename in the manifests directory.It is also possible to deploy Helm charts as AddOns. K3s includes a Helm Controller that manages Helm charts using a HelmChart Custom Resource Definition (CRD).
However it’s unclear when k3s does this.
- Only when first installed (e.g. using
curl -sfL https://get.k3s.io | sh -
)? - Every time the k3s service is restarted (e.g. using
systemctl restart
)? - As soon as a
-config.yaml
file is added (i.e. something is watching the directory for new files)?
I added a /var/lib/rancher/k3s/server/manifests/traefik-config.yaml
with the following content and nothing seems to happen:
apiVersion: helm.cattle.io/v1
kind: HelmChartConfig
metadata:
name: traefik
namespace: kube-system
spec:
valuesContent: |-
externalIP: 192.168.1.100