Make a note about KUBECONFIG environment variable.

A new to k3s user might get "surprised" by error messages from kubectl
or k3s like:

  WARN[0000] Unable to read /etc/rancher/k3s/k3s.yaml, please start server with --write-kubeconfig-mode to modify kube config permissions
  error: error loading config file "/etc/rancher/k3s/k3s.yaml": open /etc/rancher/k3s/k3s.yaml: permission denied

It can happen when there is a k3s installed on the same machine and
`/etc/rancher/k3s/k3s.yaml` present.

Signed-off-by: Kyr Shatskyy <kyrylo.shatskyy@suse.com>
This commit is contained in:
Kyr Shatskyy
2023-03-17 23:35:30 +01:00
parent 10802befe2
commit 4388ffb703
@@ -38,6 +38,8 @@ The kubeconfig file is important for accessing the Kubernetes cluster. Copy the
scp root@<IP_OF_LINUX_MACHINE>:/etc/rancher/k3s/k3s.yaml ~/.kube/config
```
In some cases it may need to make sure that your shell has the environment variable `KUBECONFIG=~/.kube/config` defined, for instance, it can be exported in your profile or rc files.
</TabItem>
<TabItem value="Windows">