<p>I have a running GKE cluster with cockroachDB active. It's been running for quite a while and I don't want to reinitialize it from scratch - it uses the (almost) standard cockroachDB supplied yaml file to start. I need to change a switch in the exec line to modify the logging level -- currently it's set to the below (but that is logging all information messages as well as errors)</p>

<pre><code>exec /cockroach/cockroach start --logtostderr --insecure --advertise-host $(hostname -f) --http-host 0.0.0.0 --join cockroachdb-0.cockroachdb,cockroachdb-1.cockroachdb,cockroa
chdb-2.cockroachdb --cache 25% --max-sql-memory 25%"
</code></pre>

<p>How do I do this without completely stopping the DB?</p>

bruce
<p>Kubernetes allows you to update StatefulSets in a rolling manner, such that only one pod is brought down at a time.</p>

<p>The simplest way to make changes is to run <code>kubectl edit statefulset cockroachdb</code>. This will open up a text editor in which you can make the desired change to the command, then save and exit. After that, Kubernetes should handle replacing the pods one-by-one with new pods that use the new command.</p>

<p>For more information:</p>

<ul>
<li><a href="https://www.cockroachlabs.com/docs/stable/orchestrate-cockroachdb-with-kubernetes.html#step-10-upgrade-the-cluster" rel="nofollow noreferrer">https://www.cockroachlabs.com/docs/stable/orchestrate-cockroachdb-with-kubernetes.html#step-10-upgrade-the-cluster</a></li>
<li><a href="https://kubernetes.io/docs/tutorials/stateful-application/basic-stateful-set/#updating-statefulsets" rel="nofollow noreferrer">https://kubernetes.io/docs/tutorials/stateful-application/basic-stateful-set/#updating-statefulsets</a></li>
<li><a href="https://kubernetes.io/docs/concepts/cluster-administration/manage-deployment/#in-place-updates-of-resources" rel="nofollow noreferrer">https://kubernetes.io/docs/concepts/cluster-administration/manage-deployment/#in-place-updates-of-resources</a></li>
</ul>
