May 2018
Intermediate to advanced
554 pages
13h 51m
English
One context contains a cluster, namespace, and user. According to the current context, the client will use the specified user information and namespace to send requests to the cluster. To set up a context, we will use the kubectl config set-context <CONTEXT_NAME> --user=<CREDENTIAL_NAME> --namespace=<NAMESPACE> --cluster=<CLUSTER_NAME> command to create or update it:
// in localhost cluster, create a context for accessing local cluster's default namespace$ kubectl config set-context default/local/myself --user=myself@local --namespace=default --cluster=local-clusterContext "default/local/myself" created.// furthermore, create another context for remote cluster$ kubectl config set-context default/remote/myself ...
Read now
Unlock full access