0

I have a Kafka cluster in Kubernetes. I have a persistent volume attached to each of my 3 Kafka pods.

I am planning on resizing the attached disk via GCP API's while the Kafka cluster is still running [client are producing and consuming from Kafka when the resize is happening].

After that I will do a rolling restart of the Kafka cluster [3 pod cluster].

Will there be any data loss if I resize the disk of a running cluster ? Can we still read and write from the disk while the resize is happening ?

Thanks a lot for your answers

OneCricketeer
  • 179,855
  • 19
  • 132
  • 245
  • 2
    Duplicated with https://stackoverflow.com/questions/40335179/can-a-persistent-volume-be-resized – Ryan Siu Jan 06 '21 at 12:13
  • I saw that post. But I am resizing the disk via GCP API first and not modifying the storage property in PVC. My question is will resizing the disk using GCP API and then restarting the pod, result in any issue contrary to the post where the k8s resource pv is updated with a new size. – Prakash Premkumar Jan 06 '21 at 12:46
  • If the pv is responsible for the creation of the GCP disk you should do the change the PV first.(not tested) – Zambozo Jan 06 '21 at 14:45
  • @Zambozo I am directly creating the disk using GCP API and then referencing the disk in k8s Persistent Volume. – Prakash Premkumar Jan 06 '21 at 15:06
  • Then you are correct you should be able to change the GCP disk then the PV. (do a backup first, just good practice) – Zambozo Jan 06 '21 at 15:08

0 Answers0