CKA Mock tests - change PV or PVC

In questions related to storage it’s not clear if we should change PV or PVC. Is the CKA also ambiguous like this?

Can you give examples of the questions you are not clear on, with links to the labs they appear in?

I should have been more clear, it’s in the CKA ultimate mock exams series. I will post the exercises here when I find them again

What’s needed to identify the questions due to them being randomized is the SECTION title and first few lines of question.

Thanks

Here are the 2 exercises where it’s ambiguous if we have to fix PV or PVC

  1. SECTION: TROUBLESHOOTING

The deployment called web-dp-cka17-trb has 0 out of 1 pods up and running. Troubleshoot this issue and fix it. Make sure all required POD(s) are in running state and stable (not restarting).

The application runs on port 80 inside the container and is exposed on the node port 30090.

image

The second one is showing complete in your screen shot so you must have solved it.

The first one

  1. Get the pod for the deployment and describe it. Note that it has a PVC error
  2. Examine the pod YAML to get the PVC claim name
  3. describe the PVC to find out why it is not bound
  4. List the persistent volumes to see which one it should be binding to. You can tell from the PV names
  5. Examine the properties of the PV, and then change (delete/recreate) the PVC to match the PV properties

The PVC will now bind and the pod will try to start - however you will notice that it is still failing, so

  1. describe the pod again. Note the error this time which is to do with init container.
  2. Fix the pod error with kubectl edit deployment web-dp-cka17-trb. When you save it, the deployment will replace the pod.

We are still not done! The new pod is now in CrashLoopBackoff

  1. Get the new pod for the deployment and describe it. Note that it has a liveness probe error, and note the address/port it is complaining about and compare this with information in the question
  2. kubectl edit the deployment again and fix this

The pod should now run without crashing.

Finally we are told that this deployment is listening on node port 30090, therefore we can curl any of the cluster nodes on the given node port to test the deployment works

student-node ~ ➜  k get node
NAME                    STATUS   ROLES           AGE   VERSION
cluster1-controlplane   Ready    control-plane   10h   v1.26.0
cluster1-node01         Ready    <none>          10h   v1.26.0
cluster1-node02         Ready    <none>          10h   v1.26.0

student-node ~ ➜  curl http://cluster1-node01:30090
Init Done - Welcome to KodeKloud Labs!

image

1 Like