Ways to connect to cluster using kn (#4095)

* Updating client connection doc

* Edited the config text format

* Update docs/client/README.md

Co-authored-by: Samia Nneji <snneji@vmware.com>

* Updating kn client doc for more ways of connection to the cluster

* Only keeping kubeconfig info for kn CLI

* Update docs/client/README.md

Co-authored-by: Samia Nneji <snneji@vmware.com>

* Update docs/client/README.md

Co-authored-by: Samia Nneji <snneji@vmware.com>

* Update docs/client/README.md

Co-authored-by: Samia Nneji <snneji@vmware.com>

Co-authored-by: Samia Nneji <snneji@vmware.com>
This commit is contained in:
Gunjan Vyas 2021-08-12 22:34:35 +05:30 committed by GitHub
parent 135f2fde50
commit d1dff0aefb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 2 deletions

View File

@ -28,9 +28,15 @@ See [Installing `kn`](install-kn/).
## Connecting CLI tools to your cluster
After you have installed `kubectl` or `kn`, these tools will search for the `kubeconfig` file of your cluster in the default location of `$HOME/.kube/config`, and will use this file to connect to the cluster.
After you have installed `kubectl` or `kn`, these tools will search for the `kubeconfig` file of your cluster in the default location of `$HOME/.kube/config`, and will use this file to connect to the cluster. A `kubeconfig` file is usually automatically created when you create a Kubernetes cluster.
You can also set the environment variable `$KUBECONFIG`, and point it to the kubeconfig file.
Using the `kn` CLI, you can specify the following options to connect to the cluster:
- `--kubeconfig`: use this option to point to the `kubeconfig` file. This is equivalent to setting the `$KUBECONFIG` environment variable.
- `--context`: use this option to specify the name of a context from the existing `kubeconfig` file. Use one of the contexts from the output of `kubectl config get-contexts`.
A `kubeconfig` file is usually automatically created when you create a Kubernetes cluster.
You can also specify a config file in the following ways: