kubernetes-yaml/learn/learn-kubernetes-master/kiamol/ch05/exercises/5.01.sh

9 lines
392 B
Bash
Raw Normal View History

cd /kiamol/ch05
kubectl apply -f sleep/sleep.yaml
kubectl exec deploy/sleep -- sh -c 'echo ch05 > /file.txt; ls /*.txt'
kubectl get pod -l app=sleep -o jsonpath='{.items[0].status.containerStatuses[0].containerID}'
kubectl exec -it deploy/sleep -- killall5
kubectl get pod -l app=sleep -o jsonpath='{.items[0].status.containerStatuses[0].containerID}'
kubectl exec deploy/sleep -- ls /*.txt