From f0b6b95abd56135db8fd01e2ab56ac88c138baac Mon Sep 17 00:00:00 2001 From: Anatoli Babenia Date: Tue, 26 Sep 2017 00:50:11 +0300 Subject: [PATCH] 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 --- .../organize-cluster-access-kubeconfig.md | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/docs/concepts/configuration/organize-cluster-access-kubeconfig.md b/docs/concepts/configuration/organize-cluster-access-kubeconfig.md index 78a63da117..3709914bd5 100644 --- a/docs/concepts/configuration/organize-cluster-access-kubeconfig.md +++ b/docs/concepts/configuration/organize-cluster-access-kubeconfig.md @@ -37,16 +37,20 @@ in a variety of ways. For example: - Administrators might have sets of certificates that they provide to individual users. 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. ## Context -A kubeconfig file can have *context* elements. Each context is a triple -(cluster, namespace, user). You can use `kubectl config use-context` to set -the current context. The `kubectl` command-line tool communicates with the -cluster and namespace listed in the current context. And it uses the -credentials of the user listed in the current context. +A *context* element in a kubeconfig file is used to group access parameters +under a convenient name. Each context has three parameters: cluster, namespace, and user. +By default, the `kubectl` command-line tool uses parameters from +the *current context* to communicate with the cluster. + +To choose the current context: +``` +kubectl config use-context +``` ## The KUBECONFIG environment variable