Mariyo
Mariyo

Reputation: 506

Kubespray: How to add multiple GlusterFS disk volume devices for one node

I am playing with Kubespray and want to add GlusterFS persistent volumes. My inventory.ini looks like this:

[all] 
k8s-master    ansible_host=x.x.x.x
k8s-node-1    ansible_host=y.y.y.y disk_volume_device_1=/media/125GB_HDD.img

[kube-master] 
k8s-master

[etcd] 
k8s-master

[kube-node] 
k8s-master 
k8s-node-1

[k8s-cluster:children] 
kube-node 
kube-master

[gfs-cluster] 
k8s-node-1

[network-storage:children] 
gfs-cluster

But I would like to add more devices than just disk_volume_device_1. I tried disk_volume_device_2=/media/20GB_HDD.img but it did not work.

Upvotes: 0

Views: 852

Answers (1)

Crou
Crou

Reputation: 11418

Kubespray is for deploying a cluster.

If you want to change the capacity of deployed Persistent Volumes, you can edit (kubectl edit pv <name_of_pv>) the PersistenVolume.spec and change the capacity.storage value.

apiVersion: v1
kind: PersistentVolume
metadata:
  name: glusterfs 
spec:
  capacity:
      storage: "150Gi"
  accessModes:
    - ReadWriteMany
  glusterfs:
    endpoints: glusterfs
    path: gluster
    readOnly: false
  persistentVolumeReclaimPolicy: Retain

I recommend reading Resizing Persistent Volumes using Kubernetes.

Also you can read these docs Deploying a Kubespray Kubernetes Cluster with GlusterFS.

If you would be interested in using Heketi, please check this guide Increase GlusterFS volume size in Kubernetes.

Upvotes: 1

Related Questions