For the question where they ask you to monitor pod and extract log lines corresponding to the error . Did they not only want that one specific line or did they ask for the whole log of the pod? video time 9:11
Ideally, you should grep the log line only. But in the exam question,you may observe only these logs .... These questions and answers are just a tips and tricks. Which will ultimately help you to clear the exam.
@@anishrana2001ful Thank you , they did ask this specific question , so I was wondering if I misunderstood what they wanted . Thanks for the amazing context . Looking forward to the rest
In the sidecar question , the command part in documentation has "-f" flag. But in exam the command they provided didn't have that "-f" flag. With the flag pod status is 2/2 where as without -f it is in crashloopback . So what is recommended in exam. Use the "-f" and make the pod 2/2 or put the command as in question and leave it in 1/2 Crashloop state.
Always go with exam task. If in the exam, you will observe without "-f" option then go with without "-f" option. You will notice your container will still produce output. See the below output. [root@master1 data]# kubectl get pods -w -NAME READY STATUS RESTARTS AGE deployment-007-688657cb7-wmpn9 1/2 CrashLoopBackOff 5 (2m20s ago) 5m26s deployment-007-688657cb7-wmpn9 1/2 NotReady 6 (2m46s ago) 5m52s deployment-007-688657cb7-wmpn9 1/2 CrashLoopBackOff 6 (15s ago) 6m6s- [root@master1 data]# kubectl logs deployment-007-688657cb7-wmpn9 -c sidecar-two i luv cncf i luv cncf i luv cncf i luv cncf [root@master1 data]# kubectl logs deployment-007-688657cb7-wmpn9 -c sidecar-two | wc -l 18 [root@master1 data]# kubectl logs deployment-007-688657cb7-wmpn9 -c sidecar-two | wc -l 35
@@anishrana2001ful yes watched your video on sidecar. In exam the -f option was provided but the container was not generating logs. Most probably it was volume mount issue. The volume mount provided with the logacy-app container was the default one which we get while creating a new pod, maybe also needed to remove the existing volume options and put /var/log path there with the new volume name.
@@anishrana2001ful - for etcd - certs/key fle path not found... I ran with the provided keys/certs and also I tried with the etcd manifest yaml both went have same issue
@@anishrana2001ful As mentioned in the video I added 6 lines but not worked, error "logs" not found - - name: busybox image: busybox args: [/bin/sh, -c, 'tail -n+1 /var/log/big-corp-app.log'] volumeMounts: - name: logs mountPath: /var/log
SAVE 35% NOW, use Coupon code : *PROMOTEST24*
HURRY! *EXTENDED until January 31, 2025
_Certification Prices Increase February 4, 2025_
For the question where they ask you to monitor pod and extract log lines corresponding to the error . Did they not only want that one specific line or did they ask for the whole log of the pod? video time 9:11
Ideally, you should grep the log line only. But in the exam question,you may observe only these logs ....
These questions and answers are just a tips and tricks. Which will ultimately help you to clear the exam.
@@anishrana2001ful Thank you , they did ask this specific question , so I was wondering if I misunderstood what they wanted . Thanks for the amazing context . Looking forward to the rest
In the sidecar question , the command part in documentation has "-f" flag. But in exam the command they provided didn't have that "-f" flag. With the flag pod status is 2/2 where as without -f it is in crashloopback . So what is recommended in exam. Use the "-f" and make the pod 2/2 or put the command as in question and leave it in 1/2 Crashloop state.
Always go with exam task. If in the exam, you will observe without "-f" option then go with without "-f" option. You will notice your container will still produce output. See the below output.
[root@master1 data]# kubectl get pods -w
-NAME READY STATUS RESTARTS AGE
deployment-007-688657cb7-wmpn9 1/2 CrashLoopBackOff 5 (2m20s ago) 5m26s
deployment-007-688657cb7-wmpn9 1/2 NotReady 6 (2m46s ago) 5m52s
deployment-007-688657cb7-wmpn9 1/2 CrashLoopBackOff 6 (15s ago) 6m6s-
[root@master1 data]# kubectl logs deployment-007-688657cb7-wmpn9 -c sidecar-two
i luv cncf
i luv cncf
i luv cncf
i luv cncf
[root@master1 data]# kubectl logs deployment-007-688657cb7-wmpn9 -c sidecar-two | wc -l
18
[root@master1 data]# kubectl logs deployment-007-688657cb7-wmpn9 -c sidecar-two | wc -l
35
@@anishrana2001ful yes watched your video on sidecar. In exam the -f option was provided but the container was not generating logs. Most probably it was volume mount issue. The volume mount provided with the logacy-app container was the default one which we get while creating a new pod, maybe also needed to remove the existing volume options and put /var/log path there with the new volume name.
Thank you, passed the CKA exam - (ETCD and sidecar questions do not work in the exam, if possible create a new video).
Heartiest Congratulations
May I ask you to elaborate what went wrong on etcd and sidecar questions?
@@anishrana2001ful - for etcd - certs/key fle path not found... I ran with the provided keys/certs and also I tried with the etcd manifest yaml both went have same issue
@@anishrana2001ful As mentioned in the video I added 6 lines but not worked, error "logs" not found
- - name: busybox
image: busybox
args: [/bin/sh, -c, 'tail -n+1 /var/log/big-corp-app.log']
volumeMounts:
- name: logs
mountPath: /var/log
Are the CKA exam questions similar to those in the video?
yes@@dangtuan-cntt
Save up to 40% on CKA, CKAD and other Linux foundation certifications, limited time only (2 days).
Save $100 till 30th July 2024 ,use coupon "JULY24"