I am trying to solve this question, I have created pvc but it is also in pending . . .

disha rajpal:
I am trying to solve this question, I have created pvc but it is also in pending state. Can anyone tell me the approach to solve this question.

A new deployment called alpha-mysql has been deployed in the alpha namespace. However, the pods are not running. Troubleshoot and fix the issue. The deployment should make use of the persistent volume alpha-pv to be mounted at /var/lib/mysql and should use the environment variable MYSQL_ALLOW_EMPTY_PASSWORD=1 to make use of an empty root password.
Important: Do not alter the persistent volume.

unnivkn:
you can refer the solution video

disha rajpal:
There is not solution video I guess.

unnivkn:
Are you doing Mock exaam-2 ?

disha rajpal:
No lighting labs

unnivkn:
kubectl get po -n alpha
kubectl -n alpha describe pod alpha-mysql-xxxxxxx
–you can find an error at the end.

Pradeep:
the pvc you create should have same spec as pv , for instance , in pv if accessModes: ReadWriteOnce this should be same in pvc, let me know if you still face the issue

Basavraj Nilkanthe:
@disha rajpal troubleshooting section intention is to build your capability to understand problem statement and debug it according… If your pod is not in running state… First step to check pod logs and if you don’t get anything… Describe pod or rs to get hint on your problem statement by looking into event sections… As you are saying pvc is pending state which has been using in pod spec… It’s simple right… There is only reason why its goes in pending state because pvc couldn’t find matching pv to bind it… Binding happens between pv and pvc based few parameter like accessMode, storage claor or few more… Its better to check that

disha rajpal:
Thanks for the help.