Skip to content

Instantly share code, notes, and snippets.

@barbietunnie
Created April 10, 2022 14:57
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save barbietunnie/d751b9230ce8ecc009c7d0e610a6e4b8 to your computer and use it in GitHub Desktop.
Save barbietunnie/d751b9230ce8ecc009c7d0e610a6e4b8 to your computer and use it in GitHub Desktop.
Fix: error loading config file "/etc/rancher/k3s/k3s.yaml": open /etc/rancher/k3s/k3s.yaml: permission denied

How to fix: error loading config file "/etc/rancher/k3s/k3s.yaml": open /etc/rancher/k3s/k3s.yaml: permission denied

  1. Change file permissions
sudo chmod 644 /etc/rancher/k3s/k3s.yaml
  1. Re-install k3s or start server modified kube config permissions
curl -sfL https://get.k3s.io | sh -s - --write-kubeconfig-mode 644

or

curl -sfL https://get.k3s.io | K3S_KUBECONFIG_MODE="644" sh -s -
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment