DigitalOcean blockstorage using for Kubernetes Volume

I have a K8S cluster running on DigitalOcean. I have a Postgresql database and I want to create a volume using DigitalOcean BlockStorage, which will be used by the Postgresql module as a volume. Are there any examples of how to do this?

If you cannot use DigitalOcean blockstorage, how do most companies launch a data warehouse for databases?

+4
source share
2 answers

There is no official support yet. You can try an example from someone on this github question :

: digitalocean. Attach/detach . , k8s digitalocean. https://github.com/wardviaene/kubernetes/tree/do-volume

yml :

spec:
  containers:
  - name: k8s-demo
    image: yourimage
    volumeMounts:
    - mountPath: /myvol
      name: myvolume
    ports:
    - containerPort: 3000
  volumes:
  - name: myvolume
    digitaloceanVolume:
      volumeID: mykubvolume
      fsType: ext4 Where mykubvolume is the volume created in DigitalOcean in the same region.

:

[] apikey = do-api-key region = : --cloud-provider = digitalocean --cloud- =/ .. /cloud.config

, godo , PR (digitalocean/godo # 102)

+2

flexvolumes , . script , script

0

Source: https://habr.com/ru/post/1675306/


All Articles