Report this

What is the reason for this report?

Cannot create block storage volume

Posted on September 22, 2022

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.



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!

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.

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.

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.