Skip to content

Kubernetes - Create a Simple Resource#

  • #BUG: CrashLoopBackOff? WTF?

  • Running things directly

    [!WARNING]
    This is not the recommended way to run things in Kubernetes!

    kubectl run --image gcr.io/google-containers/busybox mypod
    

    output:

    pod/mypod created
    
  • Inspect the pod

    kubectl get pod
    

    output:

    NAME    READY   STATUS             RESTARTS      AGE
    mypod   0/1     CrashLoopBackOff   1 (12s ago)   16s
    
  • Look at "all" the things:

bash kubectl get all

1
2
3
4
5
6
7
8
9
output:

```bash
NAME        READY   STATUS             RESTARTS     AGE
pod/mypod   0/1     CrashLoopBackOff   1 (3s ago)   7s

NAME                 TYPE        CLUSTER-IP   EXTERNAL-IP   PORT(S)   AGE
service/kubernetes   ClusterIP   10.96.0.1    <none>        443/TCP   13m
```