Update organize-cluster-access-kubeconfig.md (#5611)

* Update organize-cluster-access-kubeconfig.md

Explain that context is just a named group for convenience, and
that current context is used by default if no other params are present

* Update organize-cluster-access-kubeconfig.md
This commit is contained in:
Anatoli Babenia
2017-09-26 00:50:11 +03:00
committed by Zach Corleissen
parent fd31a775c6
commit f0b6b95abd
@@ -37,16 +37,20 @@ in a variety of ways. For example:
- Administrators might have sets of certificates that they provide to individual users. - Administrators might have sets of certificates that they provide to individual users.
With kubeconfig files, you can organize your clusters, users, and namespaces. With kubeconfig files, you can organize your clusters, users, and namespaces.
And you can define contexts that enable users to quickly and easily switch between You can also define contexts to quickly and easily switch between
clusters and namespaces. clusters and namespaces.
## Context ## Context
A kubeconfig file can have *context* elements. Each context is a triple A *context* element in a kubeconfig file is used to group access parameters
(cluster, namespace, user). You can use `kubectl config use-context` to set under a convenient name. Each context has three parameters: cluster, namespace, and user.
the current context. The `kubectl` command-line tool communicates with the By default, the `kubectl` command-line tool uses parameters from
cluster and namespace listed in the current context. And it uses the the *current context* to communicate with the cluster.
credentials of the user listed in the current context.
To choose the current context:
```
kubectl config use-context
```
## The KUBECONFIG environment variable ## The KUBECONFIG environment variable