Created
January 20, 2021 23:04
-
-
Save dmusicant-dk/b6ac1428c2a9e607d411040fd7a6403e to your computer and use it in GitHub Desktop.
Using K8s Clusters vs Contexts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Find out the contexts you've configured and which is the default | |
# (will be the one with the asterisk) | |
kubectl config get-contexts | |
# Get detailed info on a specified cluster | |
kubectl cluster-info dump --context=minikube | |
# Set cluster for a specific command | |
export CLUSTER=minikube | |
kubectl cluster-info dump --context=${CLUSTER} | |
# Set kubectl to use a specific context for all commands | |
kubectl config use-context minikube | |
kubectl cluster-info dump |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment