Exercise
Create a Pod named debug with one container based on alpine:3.15 and make sure it executes the command
sleep 10000Run a shell in the container and list the processes running inside of it
Delete the Pod
Documentation
- https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/
- https://kubernetes.io/docs/reference/generated/kubectl/kubectl-commands#run
Solution
- Create a Pod named debug with one container based on alpine:3.15 and make sure it executes the command
sleep 10000
k run debug --image=alpine:3.15 --command sleep 10000- Run a shell in the container and list the processes running inside of it
k exec debug -- ps aux- Delete the Pod
k delete po debug