Exec into both containers and verify that main.txt exist and

Exec into both containers and verify that main.txt exist andA . Solution: NEED TO WRITE ANSWER FOR THISView AnswerAnswer: A

December 5, 2020 No Comments READ MORE +

Create a pod that echo "hello world" and then exists. Have the pod deleted automatically when it's completed

Create a pod that echo "hello world" and then exists. Have the pod deleted automatically when it's completedA . Solution: kubectl run busybox --image=busybox -it --rm --restart=Never -- /bin/sh -c 'echo hello world' kubectl get po # You shouldn't see pod with the name "busybox"View AnswerAnswer: A

December 5, 2020 No Comments READ MORE +

Create a busybox pod and add "sleep 3600" command

Create a busybox pod and add "sleep 3600" commandA . Solution: kubectl run busybox --image=busybox --restart=Never -- /bin/sh -c "sleep 3600"View AnswerAnswer: A

December 4, 2020 No Comments READ MORE +

Get IP address of the pod - "nginx-dev"

Get IP address of the pod - "nginx-dev"A . Solution: Kubect1 get po -o wide Using JsonPath kubect1 get pods -o=jsonpath='{range .items[*]}{.metadata.name}{"t"}{.status.podIP}{""}{end}'View AnswerAnswer: A

December 4, 2020 No Comments READ MORE +

List all the pods showing name and namespace with a json path expression

List all the pods showing name and namespace with a json path expressionA . Solution: kubectl get pods -o=jsonpath="{.items[*]['metadata.name', 'metadata.namespace']}"View AnswerAnswer: A

December 2, 2020 No Comments READ MORE +