---
title: "Where can I find kubectl commands to manually expand etcd and Kafka controller PVCs?"
description: "Find example kubectl patch commands to manually expand etcd PVCs to 16Gi and Kafka controller PVCs to 10Gi during relevant ITRS Analytics upgrades."
url: "https://docs.itrsgroup.com/docs/itrs-analytics/latest/faqs/manually-expand-etcd-and-kafka-controller-pvcs/index.html"
---
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?

- For upgrades related to 2.17.8, existing `etcd` PVCs 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?

Use a shell loop like this:

```bash
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?

Use a similar shell loop for `etcd` PVCs:

```bash
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?

Related product guidance is available in:

- [Upgrade notes](https://docs.itrsgroup.com/docs/itrs-analytics/platform/current/upgrade/itrs-analytics-upgrade-notes/), which describe the ITRS Analytics 2.17.8 `etcd` sizing change and the ITRS Analytics 2.17.10 Kafka controller sizing change.
- [Upgrade to version 2.18.x: ClickHouse migration guide](https://docs.itrsgroup.com/docs/itrs-analytics/platform/current/upgrade/upgrading-to-version-2-18-0/), 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.



