From 68e97803ccdab4816226f98afc413edb6ff4e8dd Mon Sep 17 00:00:00 2001 From: Jan B Date: Wed, 22 Apr 2020 17:57:43 +0200 Subject: [PATCH] Clarify configuration of the kubeconfig path --- content/k3s/latest/en/cluster-access/_index.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/content/k3s/latest/en/cluster-access/_index.md b/content/k3s/latest/en/cluster-access/_index.md index 0b07d08b666..f24e4c3f964 100644 --- a/content/k3s/latest/en/cluster-access/_index.md +++ b/content/k3s/latest/en/cluster-access/_index.md @@ -3,7 +3,7 @@ title: Cluster Access weight: 21 --- -The kubeconfig file is used to configure access to the Kubernetes cluster. It is required to be set up properly in order to access the Kubernetes API such as with kubectl or for installing applications with Helm. You may set the kubeconfig by either exporting the KUBECONFIG environment variable or by specifying a flag for kubectl and helm. Refer to the examples below for details. +The kubeconfig file stored at `/etc/rancher/k3s/k3s.yaml` is used to configure access to the Kubernetes cluster. If you have installed upstream Kubernetes command line tools such as kubectl or helm you will need to configure them with the correct kubeconfig path. This can be done by either exporting the `KUBECONFIG` environment variable or by invoking the `--kubeconfig` command line flag. Refer to the examples below for details. Leverage the KUBECONFIG environment variable: @@ -13,7 +13,7 @@ kubectl get pods --all-namespaces helm ls --all-namespaces ``` -Or specify the location of the kubeconfig file per command: +Or specify the location of the kubeconfig file in the command: ``` kubectl --kubeconfig /etc/rancher/k3s/k3s.yaml get pods --all-namespaces @@ -22,4 +22,4 @@ helm --kubeconfig /etc/rancher/k3s/k3s.yaml ls --all-namespaces ### Accessing the Cluster from Outside with kubectl -Copy `/etc/rancher/k3s/k3s.yaml` on your machine located outside the cluster as `~/.kube/config`. Then replace "localhost" with the IP or name of your K3s server. `kubectl` can now manage your K3s cluster. \ No newline at end of file +Copy `/etc/rancher/k3s/k3s.yaml` on your machine located outside the cluster as `~/.kube/config`. Then replace "localhost" with the IP or name of your K3s server. `kubectl` can now manage your K3s cluster.