Home > Enterprise >  How to scale down/up all deployments in a namespace except for one with an specific name on azure pi
How to scale down/up all deployments in a namespace except for one with an specific name on azure pi

Time:01-14

I need to know a way to scale down all the deployments on a kubernetes namespace except for one with a specific string inside the name since it has dependencies. This on an AzureCLI task inside of an azure pipeline. Any ideas?

Something like: If name contains "randomname" then do not scale up/down the service.

I did try some exceptions but still not working.

CodePudding user response:

You can add a label on the one you want to exclude, and then use queries using labels and selectors to apply operations on the selected set of resources.

  • Related