Skip to content

Commit fdfade2

Browse files
committed
Propose KUBECONFIG
1 parent 00887a2 commit fdfade2

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

docs/tutorials/setup_k8s.md

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

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

65-
See https://kubernetes.io/docs/tasks/tools/install-kubectl-linux/ for the latest instructions.
66-
6765
```
68-
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
69-
sudo mv kubectl /usr/local/bin/kubectl
70-
sudo chmod +x /usr/local/bin/kubectl
66+
echo 'KUBECONFIG=$HOME/.kube/config' >> .zshrc
7167
```
7268

73-
Note that this is overwritting the kubectl that comes with k3s. That is a special version that reads its config from /etc/rancher/k3s/k3s.yaml and must therefore be run with sudo. The version we are installing here is the standard version that reads its config from $HOME/.kube/config.
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.
7470

7571
### Configure kubectl
7672

0 commit comments

Comments
 (0)