5

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.

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).

Here is my config for postgres:

          ... 
          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

Any help is highly appreciated.

1 Answer 1

3

Kubernetes does not support Volume plugin for DigitalOcean.

But you can use this using FlexVolume plugin as external storage.

  • Digital Ocean Flex Plugin
  • Digital Ocean External Provisioner

See this comment in a PR for DigitalOcean volume support.

If you want to use DigitalOcean block storage, see Kubernetes DigitalOcean Provisioner to setup digitalocean-flexplugin.

Sign up to request clarification or add additional context in comments.

9 Comments

Hi again, @aerokite, I carefully followed the instructions on Kubernetes DigitalOcean Provisioner, still have the same error: Normal SuccessfulMountVolume 2m kubelet, node-1 MountVolume.SetUp succeeded for volume "default-token-gxvtl" Warning FailedMount 3s kubelet, node-1 Unable to mount volumes for pod "busy-pod_default(7562c388-0a59-11e8-bdb8-7eb68b307981)": timeout expired waiting for volumes to attach/mount for pod "default"/"busy-pod". list of unattached/unmounted volumes=[vol1]
kubectl get pv ?
kubectl get pv postgres-volume 3Gi RWO Retain Released default/postgres-pv-claim
this pv was created for postgres, then I tried the example pod, didnt work with either
@aerokite Have you guys ever gotten this to work? I have tried for weeks and it never tries to mount. I get a weird error about a 'U' character. I opened an issue and no one responded github.com/kubernetes-incubator/external-storage/issues/761
|

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.