Skip to content

Commit 7b7bb4e

Browse files
authored
Update setup_k8s.md
1 parent fdfade2 commit 7b7bb4e

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

docs/tutorials/setup_k8s.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,14 @@ curl -sfL https://get.k3s.io | sh -
6262

6363
Kubectl is the command line tool for interacting with Kubernetes Clusters.
6464

65+
Note that by default, the kubectl that comes with k3s reads its config from /etc/rancher/k3s/k3s.yaml and would therefore be run with sudo. By using $KUBECONFIG we conform to the standard version that reads its config from $HOME/.kube/config.
66+
6567
```
66-
echo 'KUBECONFIG=$HOME/.kube/config' >> .zshrc
68+
echo 'export KUBECONFIG=$HOME/.kube/config' >> $HOME/.profile
69+
source $HOME/.profile
6770
```
6871

69-
Note that by default, the kubectl that comes with k3s reads its config from /etc/rancher/k3s/k3s.yaml and must therefore be run with sudo. By using $KUBECONFIG we conform to the standard version that reads its config from $HOME/.kube/config.
72+
Then log out for this to be set for all shells.
7073

7174
### Configure kubectl
7275

0 commit comments

Comments
 (0)