grimoire

personal wiki
git clone git://git.pyratebeard.net/grimoire.git
Log | Files | Refs

kubernetes.md (287B)


      1 # kubernetes
      2 
      3 * list pods for all namespaces
      4 ```
      5 kubectl get pods --all-namespaces
      6 ```
      7 
      8 * get list of containers in pod
      9 ```
     10 kubectl -n <namespace> get pods <pod_name> -o jsonpath='{.spec.containers[*].name}'
     11 ```
     12 
     13 * connect to shell on pod
     14 ```
     15 kubectl exec -it pods/demo -- /bin/bash
     16 ```