how to curl to api before scaling

I have an application that uses an install token that is required for each new install (token can't be used more than once). I have an api I created that I can curl to that will recreate the secret.yaml file with a new install token when I run it.

Is there a way to trigger the curl command to execute when I run kubectl scale deployment --replicas=x so that the secret.yaml will update before it creates the new pod?

Posted Jul 1, 2021, 12:09 AM UTC · edited

112
Loading comments…