重要知识点练习笔记
练习一
Set confifiguration context $kubectl confifig use-context k8s.
Monitor the logs of Pod foobar and Extract log lines corresponding to error unable-to-access-website . Write them to /opt/KULM00201/foobar.
kubectl config use-context k8s
mkdir /opt/KULM00201/
kubectl logs foobar | grep 'unable-to-access-website' > /opt/KULM00201/foobar
练习二
Set configuration context $kubectl config use-context k8s. List all PVs sorted by name, saving the full
kubectl output to /opt/KUCC0010/my_volumes. Use kubectl own functionally for sorting the output, and
do not manipulate it any further.