1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
apiVersion: apps/v1 kind: Deployment metadata: name: ubuntu spec: replicas: 1 selector: matchLabels: app: "ubuntu" template: metadata: labels: app: "ubuntu" spec: containers: - name: ubuntu image: ubuntu command: - sleep - infinity |
これをつけないとCrashLoopBackOffになる
1 2 3 |
command: - sleep - infinity |
起動
1 2 |
yuta:~ $ kubectl apply -f ubuntu-pod.yaml deployment.apps/ubuntu created |