Ugly Command Party - Day 9
Shea Stewart
Technologist working in Platform & Customer Engineering Capacities @ RunWhen
On the 9th of the ugly command party, the command I'll share is:
Ugly Command Name: Check Missing or Risky PodDisruptionBudget Policies
What does it do?
This command searches through Deployments and StatefulSets in a namespace to determine if a PDB should exist, and if one does, if it’s risky or OK. It is looking for:
When would you use it?
Every now and again it’s nice to use this command as a checklist item to ensure that:
What is the command?
Please view the GitHub Gist below to find the code snippet. Due to a limitation with LinkedIn, it does not accept some code in the code snippet and breaks the Article feature :-/
领英推荐
What is some sample output?
Deployments:
-----------
NAME PDB STATUS
Deployment/awesome-app never-lose-a-pod Risky
Deployment/magic-app Missing
Statefulsets:
-------------
NAME PDB STATUS
What does it need?
If you want this command tailored for your environment and ready to copy & paste, this command has been added to the open source library of commands available through RunWhen Local. Check it out here: https://docs.runwhen.com/public/runwhen-local/getting-started/running-locally
Find an example of the command here: https://runwhen-local.sandbox.runwhen.com/online-boutique/online-boutique-Namespace-Health/#check-missing-or-risky-poddisruptionbudget-policies
Have an ugly command to share? Collaborate with us on GitHub with issues or discussions
This is part of a series.?Check out?this article?to see additional ugly commands posted in the series.