Where can I find kubectl commands to manually expand etcd and Kafka controller PVCs?
If you need to manually expand persistent volume claims (PVCs) during an upgrade, you can patch a matching set of PVCs in a shell loop. This is relevant to the upgrade requirements introduced around ITRS Analytics 2.17.8 and 2.17.10, where existing PVCs may retain their old size even after the configured diskSize default has increased.
When is manual PVC expansion needed? Copied
- For upgrades related to 2.17.8, existing
etcdPVCs created with the older default of 1Gi must be manually expanded to 16Gi. - For upgrades related to 2.17.10, existing Kafka controller PVCs created with the older default of 1Gi must be manually expanded to at least 10Gi.
Changing diskSize in configuration does not automatically resize PVCs that already exist. If your storage platform supports volume expansion, you can patch the PVCs directly.
How do I expand Kafka controller PVCs to 10Gi? Copied
Use a shell loop like this:
for pvc in $(kubectl get pvc -n itrs -o name | grep kafka-controller-data); do
kubectl patch "$pvc" -n itrs -p '{"spec":{"resources":{"requests":{"storage":"10Gi"}}}}'
done
In this example, kubectl get pvc -n itrs -o name lists the PVC resource names in the itrs namespace, grep kafka-controller-data filters that list to matching PVCs, the for loop iterates over each matching PVC, and kubectl patch ... -p updates .spec.resources.requests.storage to 10Gi.
How do I expand etcd PVCs to 16Gi? Copied
Use a similar shell loop for etcd PVCs:
for pvc in $(kubectl get pvc -n itrs-analytics -o name | grep etcd-data); do
kubectl patch "$pvc" -n itrs-analytics -p '{"spec":{"resources":{"requests":{"storage":"16Gi"}}}}'
done
This works the same way as the Kafka example, but targets PVCs whose names contain etcd-data and updates .spec.resources.requests.storage to 16Gi.
Where is this documented? Copied
Related product guidance is available in:
- Upgrade notes, which describe the ITRS Analytics 2.17.8
etcdsizing change and the ITRS Analytics 2.17.10 Kafka controller sizing change. - Upgrade to version 2.18.x: ClickHouse migration guide, which includes an example shell loop for manually resizing matching PVCs.
Note
Adjust the namespace if your deployment uses a different one, and confirm that your Kubernetes storage class supports PVC expansion before applying these commands.