kubectl get pods -l

From wikieduonline
Revision as of 13:26, 30 November 2023 by Welcome (talk | contribs)
Jump to navigation Jump to search

kubectl get pods -l app=nginx -L YOUR_LABEL
-L or --label-columns
export POD_NAME=$(kubectl get pods --namespace default -l "app.kubernetes.io/name=prometheus,app.kubernetes.io/instance=prometheus" -o jsonpath="{.items[0].metadata.name}")


kubectl get pods, -l, -n , Running, Pending, Init, ContainerCreating, ImagePullBackOff,Init:ImagePullBackOff, Terminating, ErrImagePull, Completed, InvalidImageName, kube-system, ls_containers.sh

Advertising: