pires/kubernetes-elasticsearch-cluster

unknown field "hostPath"

SHUFIL opened this issue · 1 comments

i getting this issue ,error: error validating "es-d.yaml": error validating data: ValidationError(StatefulSet.spec.template.spec.containers[1]): unknown field "hostPath" in io.k8s.api.core.v1.Container; if you choose to ignore these errors, turn validation off with --validate=false

only one change in yaml file , what i have used in yaml instead of

volumeClaimTemplates:
  - metadata:
      name: storage
    spec:
      storageClassName: standard
      accessModes: [ ReadWriteOnce ]
      resources:
        requests:
          storage: 12Gi 

i have used

        volumeMounts:
        - name: storage
          mountPath: /es
        volumes:
      - name: storage
        hostPath:
          path: /es

but its getting error, what i need to correct.

pires commented

Your indentation is wrong. See https://kubernetes.io/docs/concepts/storage/volumes/#hostpath for explanation and an example.