There is a script located at /root/pod-cka26-arch.sh on the student-node. Update this script to add a command to filter/display the label with value component of the pod called kube-apiserver-cluster1-controlplane (on cluster1) using jsonpath.
my answer:
k get pods -n kube-system kube-apiserver-cluster1-controlplane -o jsonpath=β{.metadata.labels.component}β
But in the end of exame, this asnwer has not pass and the expected answer was:
kubectl --context cluster1 get pod -n kube-system kube-apiserver-cluster1-controlplane -o jsonpath=β{.metadata.labels.component}β
Which give me some doubts:
For all answer in the Official exame:
A) Why my answer is wrong ?
B) Do I need to always use the kubectl instead K ?
C) Once in the beggning Iβm setting the context, should I uses the --context in all questions also ?
The likely problem here is the use of the βkβ alias in your answer; aliases only resolve in certain contexts, and in scripts, they generally do not. So the grader wonβt approve this as a result.
The grader really should allow for an answer w/o the --context flag, but Iβd recommend fixing the alias issue before we worry about that.
The Ultimate Mock Exams are relatively new, and grading variable input can be difficult to get right; before I started my support gig with KodeKloud, I did renewed my CKA, so I have also reported my share of validation issues We fix them as we find them, to make the grader code more robust.
Try adding the --context flag and see if it makes the grader STFU (F is for βfutzβ) If it does, it sounds even more like a legit grader issue β and it already sounds like a legit grader issue.