Pre-upgrade steps


We found ourselves several times asking customers to execute manual steps (Bash/Shell) on node(s) before they take the latest release (upgrade).

Is there any way in KOTS to define a piece of code to execute when customer hits ‘Deploy’ on the latest version, which would run simple bash on specified nodes (or at least all nodes) right before starting the upgrade process?

A real-life example (we all love good examples):
When rook-ceph released v1.10.0, they disabled the metrics service, but there was no functionality inside rook-ceph’s operator to kill the service. This caused us (in our test environments) and customers to have an extra unused service hanging in environments.
As a result, we had to instruct our customers to execute the following command on primary node;
kubectl delete service/csi-rbdplugin-metrics -n <AWESOME_NAMESPACE>.

Ideal solution (from my perspective)
Ability to define pre- and post-upgrade bash commands on specified nodes (i.e. by label selector). This would cover 99% of cases, as all we need is kubectl and some fancy bash, which we can come up with.

Thanks in advance,


Hi @Dom, just a quick though: How about using a kubernetes Job for this?

You would have to deploy a job as part of the upgrade process. If you need something to run before the upgrade then a job won’t be sufficient.

Any updates on this?

Hi @Dom - did you have a chance to look at Josh’s suggestion? If this is a true feature request, you should submit it to our product team via Replicated