SECRET_NAME=...
SECRET_NS=...
SECRET_KEY=...
SECRET_VALUE=...
kubectl create secret generic $SECRET_NAME --from-literal=$SECRET_KEY="$SECRET_VALUE" --dry-run -o yaml | kubeseal -o yaml --scope namespace-wide -n $SECRET_NS > $SECRET_NAME.yaml
To reinstall k3s bundled traefik first delete helm chart resources from kube-system namespace
kubectl -n kube-system delete helmchart traefik
kubectl -n kube-system delete helmchart traefik-crd
Then login to the node and re-apply traefik resources
kubectl apply -f /var/lib/rancher/k3s/server/manifests/traefik.yaml