kubectl get pods filter by name code example
Example 1: get containers in pod
kubectl get pods POD_NAME_HERE -o jsonpath='{.spec.containers[*].name}'
Example 2: using kubernetes field-selector
kubectl get pods --field-selector status.phase=Running