title: Drawback of hostPath in Kubernetes
body: <p>I have setup and Kubernetes cluster from kubespray - ansible script. 
  Now i have created a deployment with volume to be mounted as hostPath in spec.template.spec.volumes. And i have mounted the volume on all my nodes via nfs file-system. 
  Now i read in k8s documentation its not good practice but need to understand the harmfulness for the hostPath. 
  Below is sample yaml file.</p>
  
  <pre><code>spec:
    containers:
    - image: test:latest
      imagePullPolicy: Always
      name: test1
      ports:
      - containerPort: 4006
        protocol: TCP
      terminationMessagePath: /dev/termination-log
      terminationMessagePolicy: File
      volumeMounts:
      - name : test-data
        mountPath : /RIC/
      - name : test-config
        mountPath : /xyz/abc.config
        subPath : abc.config
    volumes:
    - name : test-data
      hostPath :
        path : /nfs-mount/RIC/
    - name : test-config
      configMap :
        name : test-config
  </code></pre>