Run a command against each Kubernetes kubectl context
This is powerful so use carefully!
Requires 'kubectl' to be configured and available in \$PATH
All arguments become the command template
Sets the kubectl context in each iteration and then returns the context to the original context on any exit except kill -9
Replaces {context}if present in the command template with the current kubectl context name in each iteration, but often this isn't necessary to specify explicitly given the kubectl context is changed in each iteration for each context for ease of running short commands local to the context
Since lab contexts like Docker Desktop, Minikube etc are often offline and likely to hang, they are skipped. Deleted GKE clusters you'll need to remove from your kubeconfig yourself before calling this