kubernetes

  • list pods for all namespaces

    kubectl get pods --all-namespaces
  • get 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/bash