Vivekanand Rapaka:
Hi Team, While doing some of the practice tests in Game of pods, noticed that before creating persistent volume with hostPath, its a prerequisite to create a directory for hostPath on all the nodes . For example, if we are creating a persistent volume with hostPath ‘/var/html’, a directory with ‘html’ had to be created in ‘/var’.
However while working on CKA exercises, I simply created PV, PVC and consumed it in a Pod. So I’m wondering if its a prerequisite to create the directory prior creating a PV. Please clarify.
unnivkn:
@Vivekanand Rapaka It is a good practice to validate the directories exist in host machine before creating the PV,PVC etc. In CKA exercise its might have already created for you.