CKAD-exercises icon indicating copy to clipboard operation
CKAD-exercises copied to clipboard

Update e.observability.md

Open VRay27 opened this issue 4 years ago • 1 comments

With the double-quotes enclosing : $i: $(date) , it not yielding the logs. Therefore by removing the double quotes it works just fine.

VRay27 avatar Sep 20 '20 08:09 VRay27

thanks for the review, are you sure it doesn't work as is? Can't repro

dgkanatsios@digkanat:dgkanatsios$ kubectl run busybox --image=busybox --restart=Never -- /bin/sh -c 'i=0; while true; do echo "$i: $(date)"; i=$((i+1)); sleep 1; done'
pod/busybox created
dgkanatsios@digkanat:dgkanatsios$ k logs busybox -f
0: Mon Oct  5 03:05:43 UTC 2020
1: Mon Oct  5 03:05:44 UTC 2020
2: Mon Oct  5 03:05:45 UTC 2020
3: Mon Oct  5 03:05:46 UTC 2020
4: Mon Oct  5 03:05:47 UTC 2020
5: Mon Oct  5 03:05:48 UTC 2020
6: Mon Oct  5 03:05:49 UTC 2020
7: Mon Oct  5 03:05:50 UTC 2020
8: Mon Oct  5 03:05:51 UTC 2020
9: Mon Oct  5 03:05:52 UTC 2020
10: Mon Oct  5 03:05:53 UTC 2020
11: Mon Oct  5 03:05:54 UTC 2020

dgkanatsios avatar Oct 05 '20 03:10 dgkanatsios