Pinaki Ghosh:
Question 3 of Practice Test - Commands and Arguments it is not allowing to proceed, any suggestion what is wrong here. Looks similar to what in in solution @unnivkn @Mumshad Mannambeth Appreciate the feedback, Thanks!!
Trinetra S:
@Pinaki Ghosh Please correct the indentation at command block :
command:
- "sleep"
- "5000"
or u can also use this syntax :
command : ["sleep", "4000"]
Pinaki Ghosh:
command : ["sleep", "4000"]
Thanks @Trinetra S I used this first time didn’t worked. Indentation seems fine if you see the snapshot, but will give it a try again.
Pinaki Ghosh:
or do you mean to say there should not be any space for the args under command:
Trinetra S:
it should be like this :
command:
- "sleep"
- "5000"
Pinaki Ghosh:
okies, will give it a try
Pinaki Ghosh:
command : ["sleep", "4000"]
doesn’t work. Also with the correct indentation it is failing
Pinaki Ghosh:
I even tried imperative way, but same
Pinaki Ghosh:
may be something wrong with this question in lab
Pinaki Ghosh:
did the exact same thing as in solutions video, & Hint, but no luck. can it be checked please.
unnivkn:
did you get a chance to refer the Hint/Solution tab on the question?
unnivkn:
controlplane $ cat ubuntu-sleeper-2.yaml
apiVersion: v1
kind: Pod
metadata:
name: ubuntu-sleeper-2
spec:
containers:
- name: ubuntu
image: ubuntu
command: [‘sleep’,‘5000’]
controlplane $
controlplane $
controlplane $ kubectl apply -f ubuntu-sleeper-2.yaml
pod/ubuntu-sleeper-2 created
controlplane $
controlplane $ kubectl get pods
NAME READY STATUS RESTARTS AGE
ubuntu-sleeper 1/1 Running 0 12m
ubuntu-sleeper-2 1/1 Running 0 5s
controlplane $
Pinaki Ghosh:
Hi @unnivkn thank you for responding, but if you see, I have added snapshots from Hint, and even the Video solutions, but nothing is working
Pinaki Ghosh:
my latest try was command: [‘sleep’,‘5000’] what you shared, but will try again, i have reloaded the lab