sleep 5000 명령을 수행하는 새로운 파드를 만드세요
apiVersion: v1
kind: Pod
metadata:
name: ubuntu-sleeper-2
spec:
containers:
- name: ubuntu
image: ubuntu
command:
- sleep
- "5000"
Solution)
apiVersion: v1
kind: Pod
metadata:
name: ubuntu-sleeper-2
spec:
containers:
- name: ubuntu
image: ubuntu
command:
- sleep
- "5000"
or
command:
- "sleep"
- "5000"
or
command: [ "sleep", "5000" ]
or
command: [ "sleep" ]
args: [ "5000" ]
잘못된 Manifest를 수정하세요
apiVersion: v1
kind: Pod
metadata:
name: ubuntu-sleeper-3
spec:
containers:
- name: ubuntu
image: ubuntu
command:
- "sleep"
- 1200
spec.command 에서 1200를 쌍따옴표로 감싸줌
apiVersion: v1
kind: Pod
metadata:
name: ubuntu-sleeper-3
spec:
containers:
- name: ubuntu
image: ubuntu
command:
- "sleep"
- "1200"
command --color green 을 수행하는 파드를 만드세요
apiVersion: v1
kind: Pod
metadata:
name: webapp-green
labels:
name: webapp-green
spec:
containers:
- name: simple-webapp
image: kodekloud/webapp-color
command: ["python", "app.py"]
args: ["--color", "green"]
'DevOps' 카테고리의 다른 글
CKA 예제 리마인더 - 16. Secrets (1) | 2024.11.02 |
---|---|
Kubernetes - Secret, ConfigMap (0) | 2024.11.02 |
CKA 예제 리마인더 - 13. Rolling Updates and Rollbacks (0) | 2024.10.31 |
CKA 예제 리마인더 - 12. Multiple Schedulers (0) | 2024.10.31 |
CKA 예제 리마인더 - 11. Static PODs (0) | 2024.10.31 |