I am trying to create a dynamic storage claim. After deploying my StorageClass
and PersistentVolumeClaim, the EBS volume is actually created and appears in my
AWS management console, but for some reason, the PersistentVolumeClaim is
always stuck in "Pending" state. It never actually binds to the EBS volume that
was created. I tried to deploy a Pod that uses the PersistentVolumeClaim, but I
just get the following error: "SchedulerPredicates failed due to
PersistentVolumeClaim is not bound: 'xxx', which is unexpected." A
PersistentVolume is never created in the namespace of the cluster. Oddly
enough, the EBS volume in AWS is removed when I delete the
PersistentVolumeClaim, which implies to me that it does have some connection
even though the PVC state never becomes "Bound". Any help will be greatly
appreciated.
Here is my StorageClass:
kind: StorageClass
apiVersion: storage.k8s.io/v1beta1
metadata:
name: standard
namespace: default
annotations:
storageclass.beta.kubernetes.io/is-default-class: "true"
provisioner: kubernetes.io/aws-ebs
parameters:
type: gp2
zone: us-west-2a
Here is my PersistentVolumeClaim:
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: hadoop-data-01
namespace: default
annotations:
volume.beta.kubernetes.io/storage-class: "standard"
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 10Gi
And here is the Pod I attempt to deploy to use the PVC:
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: hadoop-datanode-01
spec:
replicas: 1
template:
metadata:
labels:
app: hadoop-datanode-01
spec:
hostname: hadoop-datanode-01
volumes:
- name: hadoop-data-01
persistentVolumeClaim:
claimName: hadoop-data-01
containers:
- name: hadoop-datanode-01
image: uhopper/hadoop-datanode:2.7.2
env:
- name: CORE_CONF_fs_defaultFS
value: hdfs://hadoop-namenode:8020
ports:
- containerPort: 50075
name: fs
volumeMounts:
- mountPath: /hadoop/dfs/data
name: hadoop-data-01
--
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/kubernetes-users.
For more options, visit https://groups.google.com/d/optout.