STUDY/Data Engineering
[kodekloud] 04 Commands and Arguments 풀이 (살짝😵💫)
wonpick
2023. 1. 24. 17:59
Q1. How many PODs exist on the system?
Q2. What is the command used to run the pod ubuntu-sleeper?
Q3. Create a pod with the ubuntu image to run a container to sleep for 5000 seconds. Modify the file ubuntu-sleeper-2.yaml.
Q4. Create a pod using the file named ubuntu-sleeper-3.yaml. There is something wrong with it. Try to fix it!
-
Pod Name: ubuntu-sleeper-3
Command: sleep 1200
vi ubuntu-sleeper-3.yaml
k apply -f ubuntu-sleeper-3.yaml
sleep과 1200모두 스트링이어야 한다.
Q5. Update pod ubuntu-sleeper-3 to sleep for 2000 seconds.
Note: Only make the necessary changes. Do not modify the name of the pod. Delete and recreate the pod if
k edit pod ubuntu-sleeper-3
k replace --force -f /tmp/kubectl-edit-2969321229.yaml
Q6. Inspect the file Dockerfile given at /root/webapp-color directory. What command is run at container startup?
Q7. Inspect the file Dockerfile2 given at /root/webapp-color directory. What command is run at container startup?
Q8. Inspect the two files under directory webapp-color-2. What command is run at container startup?
cat webapp-color-2/webapp-color-pod.yaml
Q9. Inspect the two files under directory webapp-color-3. What command is run at container startup?
Q10. Create a pod with the given specifications. By default it displays a blue background. Set the given command line arguments to change it to green.
kubectl run webapp-green --image=kodekloud/webapp-color -- --color green
kubectl run NAME --image=image [--env="key=value"] [--port=port] [--dry-run=server|client] [--overrides=inline-json] [--command] -- [COMMAND] [args...] [options]