Last active
January 15, 2025 06:42
-
-
Save ItsCosmas/8819b0100d11306185da6d5fbfca1cd4 to your computer and use it in GitHub Desktop.
kubectl exec
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
kubectl config get-contexts | |
kubectl config use-context <context-name> | |
kubectl get namespaces | |
kubectl get pods -n <namespace> | |
kubectl exec -i -t -n <namespace-name> <pod-name> -c web -- sh -c "clear; (bash || ash || sh)" | |
kubectl get pods --all-namespaces -o jsonpath='{range .items[*]}{"\n"}{.metadata.name}{":\t"}{range .spec.containers[*]}{.image}{", "}{end}{end}' |\ | |
sort |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Execute into a kubernetes pod