<p>I created an EBS volume with 30 GiB size. Made two manifest files:</p>

<ul>
<li>pv-ebs.yml</li>
<li>pvc-ebs.yml</li>
</ul>

<p>In pv-ebs.yml:</p>

<pre><code>apiVersion: v1
kind: PersistentVolume
metadata:
  name: ebs
spec:
  capacity:
    storage: 30Gi
  accessModes:
    - ReadWriteOnce
  persistentVolumeReclaimPolicy: Recycle
  awsElasticBlockStore:
    fsType: ext4
    # The EBS volume ID
    volumeID: vol-111222333aaabbbccc
</code></pre>

<p>in pvc-ebs.yml</p>

<pre><code>kind: PersistentVolumeClaim
apiVersion: v1
metadata:
  name: prometheus-prometheus-alertmanager
spec:
  accessModes:
    - ReadWriteOnce
  resources:
    requests:
      storage: 1Gi
  selector:
    matchLabels:
      release: "stable"

---
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
  name: prometheus-prometheus-server
spec:
  accessModes:
    - ReadWriteOnce
  resources:
    requests:
      storage: 1Gi
  selector:
    matchLabels:
      release: "stable"
</code></pre>

<p>Use <code>helm</code> installed it: <code>helm install --name prometheus stable/prometheus</code>.</p>

<p>But on the k8s dashboard, got message:</p>

<pre><code>prometheus-prometheus-alertmanager-3740839786-np7kb
No nodes are available that match all of the following predicates:: NoVolumeZoneConflict (2).

prometheus-prometheus-server-3176041168-m3w2g
PersistentVolumeClaim is not bound: "prometheus-prometheus-server" (repeated 2 times)
</code></pre>

<p>Is there anything wrong about my method?</p>

<h2>Pods</h2>

<p><a href="https://i.stack.imgur.com/W5upH.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/W5upH.png" alt="enter image description here"></a></p>

<h2>Persistent Volumes</h2>

<p><a href="https://i.stack.imgur.com/aDyti.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/aDyti.png" alt="enter image description here"></a></p>

<p>When EBS is created, it is provisioned in a particular AZ and it can not be cross-zone mounted. If you do not have nodes available in the same zone for scheduling the pod, it will not start.</p>

<p>Another thing is that with a properly configured kube cluster, you should not need to create PV on your own at all, just create PVC and let <a href="https://kubernetes.io/docs/concepts/storage/persistent-volumes/#dynamic" rel="nofollow noreferrer">dynamic provisioning</a> do it's thing.</p>
