pires / kubernetes-elasticsearch-cluster

Elasticsearch cluster on top of Kubernetes made easy.
Apache License 2.0
1.51k stars 690 forks source link

unknown field "hostPath" #206

Closed SHUFIL closed 6 years ago

SHUFIL commented 6 years ago

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 6 years ago

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