Context

Context is the concept of the combination of cluster information, a user for authentication, and a namespace. For example, the following is the context information for one of our clusters in GKE:

- context:
  cluster: gke_devops-with-kubernetes_us-central1-b_cluster
  user: gke_devops-with-kubernetes_us-central1-b_cluster
name: gke_devops-with-kubernetes_us-central1-b_cluster

We could use the kubectl config current-context command to list the current context:

# kubectl config current-context
gke_devops-with-kubernetes_us-central1-b_cluster
To list all config information, including contexts, you could use the kubectl config view command. To check out what context is currently in use, use the kubectl config get-contexts command.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset