From 19d479e8b06bb2193f733420b72262a2a424d16e Mon Sep 17 00:00:00 2001 From: dnoland1 Date: Fri, 12 Apr 2019 14:31:28 -0700 Subject: [PATCH] kubectl to get context, instead of instructing user to look at config --- .../rancher/v2.x/en/cluster-admin/kubeconfig/_index.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/content/rancher/v2.x/en/cluster-admin/kubeconfig/_index.md b/content/rancher/v2.x/en/cluster-admin/kubeconfig/_index.md index 17b63934f43..95c6b71078b 100644 --- a/content/rancher/v2.x/en/cluster-admin/kubeconfig/_index.md +++ b/content/rancher/v2.x/en/cluster-admin/kubeconfig/_index.md @@ -30,7 +30,13 @@ For [Rancher Launched Kubernetes]({{< baseurl >}}/rancher/v2.x/en/cluster-provis > **Note:** By default, all Rancher Launched Kubernetes clusters have [Authorized Cluster Endpoint]({{< baseurl >}}/rancher/v2.x/en/cluster-provisioning/rke-clusters/options/#authorized-cluster-endpoint) enabled. -To find the name of the context(s), view the kubeconfig file. +To find the name of the context(s), run: +``` +kubectl config get-contexts --kubeconfig /custom/path/kube.config +CURRENT NAME CLUSTER AUTHINFO NAMESPACE +* my-cluster my-cluster user-46tmn + my-cluster-controlplane-1 my-cluster-controlplane-1 user-46tmn +``` ### Clusters with FQDN defined as an Authorized Cluster Endpoint