diff --git a/examples/storage/cassandra/cassandra-statefulset.yaml b/examples/storage/cassandra/cassandra-statefulset.yaml index 452a5d2622abf..c16ca6030cde9 100644 --- a/examples/storage/cassandra/cassandra-statefulset.yaml +++ b/examples/storage/cassandra/cassandra-statefulset.yaml @@ -37,7 +37,7 @@ spec: lifecycle: preStop: exec: - command: ["/bin/sh", "-c", "PID=$(pidof java) && kill $PID && while ps -p $PID > /dev/null; do sleep 1; done"] + command: ["/bin/sh", "-c", "nodetool drain"] env: - name: MAX_HEAP_SIZE value: 512M