题目
Task:
Monitor the logs of pod foobar and:
- Extract log lines corresponding to error unable-to-access-website
- Write them to /opt/KUTR00101/foobar
答案
$ kubectl config use-context k8s
$ kubectl logs foobar | grep unable-to-access-website > /opt/KUTR00101/fooba