List all contexts (clusters you can connect to)

Kubernetes Commands & Best Practices Curriculum · 3:11

Listen on 93

Lyrics

[Verse 1]
When you're working with your clusters every day
Multiple environments in your Kubernetes way
There's a command that shows you all the choices that you've got
kubectl config get-contexts shows the lot

[Chorus]
Get contexts, see them all
Current cluster, namespace call
Asterisk shows where you are
Switch between them near and far
Get contexts, list them clear
All your clusters waiting here

[Verse 2]
Three columns tell the story that you need to know
Name and cluster, namespace in a row
The current context has a star beside its name
That's your active cluster in this kubectl game

[Chorus]
Get contexts, see them all
Current cluster, namespace call
Asterisk shows where you are
Switch between them near and far
Get contexts, list them clear
All your clusters waiting here

[Bridge]
Production, staging, development too
Each context knows exactly what to do
Authentication settings stored inside
Your kubeconfig file is your guide

[Verse 3]
When you're lost and don't know where your kubectl points
Check your contexts, see all the joints
Between your terminal and clusters in the cloud
Get contexts makes the connections loud

[Chorus]
Get contexts, see them all
Current cluster, namespace call
Asterisk shows where you are
Switch between them near and far
Get contexts, list them clear
All your clusters waiting here

[Outro]
kubectl config get-contexts
Shows you all your choices
kubectl config get-contexts
Listen to those voices

← Switch to a different context | View current cluster info →