Select a Pod interactively and open a shell inside one of its containers:
kubectl peek execThe selector displays the Pod name, readiness, container count and phase. Completed and failed Pods are excluded.
Select Pod
↓
Select container when more than one exists
↓
Open /bin/bash or fall back to /bin/sh
kubectl peek exec api
kubectl peek exec -n staging
kubectl peek exec api \
--namespace staging \
--container application \
--shell /bin/shOverrides are available for namespace, context, kubeconfig, container and shell.
Alias:
kubectl peek xExit the container shell with:
exit