Get all pod names in a namespace:
kubectl get pods -n mynamespace -o jsonpath='{.items..metadata.name}'
Delete all running pods in a namespace:
kubectl delete pod $(kubectl get pods -n mynamespace -o jsonpath='{.items..metadata.name}') -n mynamespace
Get a shell in a running container
kubectl exec -it pod-name -n pod-namespace -- /bin/bash
Get a shell in the first pod for a given app
kubectl exec -it $(kubectl get pods -n pod-namespace -l=app=my-app -o jsonpath='{.items[0]..metadata.name}') -n pod-namespace -- /bin/bash