mirror of https://github.com/knative/docs.git
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:
parent
135f2fde50
commit
d1dff0aefb
|
@ -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:
|
||||
|
||||
|
|
Loading…
Reference in New Issue