Hi,

I deploy a persistent volume with a hostPath "path: /tmp/monitoring" the pod 
failed to start with the error message "lstat: /tmp/monitoring No such file or 
Directory".  If /tmp/monitoring is manually created prior to deploying the 
persistent volume then the pod is created and the "subPath: my-db" is mounted 
in /tmp/monitoring/my-db.

Can someone pls tell me what I am doing wrong or missing? I was expecting the 
/tmp/monitoring gets created at the time the container is created.

K8s version: v1.7.4
Cent OS 7.3 64 bit
VM is provision in a vCenter

---
apiVersion: v1
kind: PersistentVolume
metadata:
  name: frontend-0
  namespace: monitoring
  labels:
    app: prom-db
    namespace: my-app
spec:
  capacity:
    storage: 5Gi
  accessModes:
   - ReadWriteOnce
  persistentVolumeReclaimPolicy: Retain
  hostPath:
    path: /tmp/monitoring

Thanks in Advance.

-- 
You received this message because you are subscribed to the Google Groups 
"Kubernetes user discussion and Q&A" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to kubernetes-users+unsubscr...@googlegroups.com.
To post to this group, send email to kubernetes-users@googlegroups.com.
Visit this group at https://groups.google.com/group/kubernetes-users.
For more options, visit https://groups.google.com/d/optout.

Reply via email to