Question

Cannot create block storage volume

I’m following:

https://docs.digitalocean.com/products/kubernetes/how-to/add-volumes/

But both the pod I create and the pvc remain in pending state.

When I run kubectl describe pod elasticsearch-basic-0 (I’m following https://www.digitalocean.com/community/tutorials/how-to-set-up-an-elasticsearch-fluentd-and-kibana-efk-logging-stack-on-kubernetes tutorial as well to add elastic search) I get:

Events:
  Type     Reason             Age                   From                Message
  ----     ------             ----                  ----                -------
  Normal   NotTriggerScaleUp  3m56s (x11 over 14m)  cluster-autoscaler  pod didn't trigger scale-up:
  Warning  FailedScheduling   1s (x15 over 14m)     default-scheduler   0/1 nodes are available: 1 pod has unbound immediate PersistentVolumeClaims.

According to the first tutorial DO should automatically create a block storage volume but this does not seem to be happening. Am I missing something? Thanks.


Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

So the only way I was able to get this to work was to manually create a PersistentVolume:

apiVersion: v1
kind: PersistentVolume
metadata:
  name: elasticsearch-volume
  labels:
    type: local
spec:
  storageClassName: manual
  capacity:
    storage: 100M
  accessModes:
    - ReadWriteOnce
  hostPath:
    path: "/data/elasticsearch"

Any ideas why DO isn’t doing this automatically as suggested in the docs, perhaps my DO config is note correct because it ideally I would like to store my persistent data directly to DOs block storage.

In fact what is the difference between creating a manual storage vs using do-block-storage. Thanks.