list pods for all namespaces
kubectl get pods --all-namespacesget list of containers in pod
kubectl -n <namespace> get pods <pod_name> -o jsonpath='{.spec.containers[*].name}'connect to shell on pod
kubectl exec -it pods/demo -- /bin/bashlist all completed pods
kubectl get pod --field-selector=status.phase==Succeeded
delete all completed pods
kubectl delete pod --field-selector=status.phase==Succeededdelete all errored pods
kubectl delete pod --field-selector=status.phase==Failed