kelseyhightower / consul-on-kubernetes

Running HashiCorp's Consul on Kubernetes
Apache License 2.0
601 stars 183 forks source link

PersistentVolumeClaim is not bound #20

Open danil-demidov opened 7 years ago

danil-demidov commented 7 years ago

Hello. I has been create kubernetes cluster ( https://www.linuxtechi.com/install-kubernetes-1-7-centos7-rhel7/#comment-1221 ). I has been installed kubernetes dashboard. Now, I trying to install consul, but I got error: PersistentVolumeClaim is not bound: "data-consul-0" (repeated 4 times) I has been create "Persistent Volumes" (isshues blachniet) - it's didn't help. What could be else the problem?

Lax77 commented 7 years ago

Am also seeing similar issue. Does it mean the volumeClaimTemplates config expecting the volume created explicitly prior to deploying the statefulset?

tankchintan commented 7 years ago

@danil-demidov @Lax77 Someone created a PR for resolving this. See here.

elordahl commented 7 years ago

There are a number of ways to resolve this. If you're using AWS, you could create an AWSElasticBlockStore storageClass and assign assign it to the volumeClaimTemplates spec as storageClassName (see below):

aws-example.yml

kind: StorageClass
apiVersion: storage.k8s.io/v1
metadata:
  name: consul-storage
provisioner: kubernetes.io/aws-ebs
parameters:
  type: gp2

statefulsets/consul.yml

  volumeClaimTemplates:
    - metadata:
        name: data
       spec:
         storageClassName: consul-storage
     ...