<p>it’s been driving me crazy for about a week now. Searched over the “whole” internet with no luck. used rexray, standard config, digital ocean setup etc.</p>

<p>Cannot make it working on digital ocean with block storage.
Would be great if anyone could point me to some tutorial (preferable official kubernetes storage driver).</p>

<p>Here is my config for postgres:</p>

<pre><code>          ... 
          volumeMounts:
            - name: postgres-storage
              mountPath: /var/lib/postgresql/data
      volumes:
        - name: postgres-storage
          persistentVolumeClaim:
            claimName: postgres-pv-claim

---

apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: postgres-pv-claim 
spec:
  accessModes:
    - ReadWriteOnce
  resources:
    requests:
      storage: 3Gi

---

apiVersion: v1
kind: PersistentVolume
metadata:
  name: postgres-volume
spec:
  capacity:
    storage: 3Gi
  accessModes:
    - ReadWriteOnce
  persistentVolumeReclaimPolicy: Retain
</code></pre>

<p>Any help is highly appreciated.</p>

<p>Kubernetes does not support Volume plugin for DigitalOcean.</p>

<p>But you can use this using FlexVolume plugin as external storage.</p>

<ul>
<li>Digital Ocean Flex Plugin</li>
<li>Digital Ocean External Provisioner</li>
</ul>

<p>See this <a href="https://github.com/kubernetes/kubernetes/pull/50044#issuecomment-327158936" rel="nofollow noreferrer">comment</a> in a PR for DigitalOcean volume support.</p>

<p>If you want to use DigitalOcean block storage, see <a href="https://github.com/kubernetes-incubator/external-storage/tree/master/digitalocean" rel="nofollow noreferrer">Kubernetes DigitalOcean Provisioner</a> to setup digitalocean-flexplugin.</p>
