Here’s a breakdown of what we’ll use:
The setup would look something like this:
Say you want to set up a Horizontal Pod Autoscaler for your k8s deployment so it can scale nice and easy.
Everything is set up, your deployment is waiting for the HPA it needs in its life. You know by now from many debugging sessions that in order for HPA to work, you need to have all the containers in your pods to have resources defined like so:
- name: log-aggregator
Sounds nice, but will it actually scale?
Well if you are me, and you used “kubectl…
If you need to cleanup your namespace resources based on a prefix and don’t want to do it manually, then this script I wrote is for you.
Note that this assumes you use a naming convention for your resources.
This will iterate through resources, in the right order ( as tested so far… ) to delete everything starting with that prefix.