Created
November 29, 2023 12:22
-
-
Save achetronic/e058d10b5d57ade13119058f8920224c to your computer and use it in GitHub Desktop.
Add and delete a label on all namespaces to trigger update event
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
NAMESPACES=$( kubectl get namespaces --no-headers -o custom-columns=":metadata.name") | |
for namespace in $NAMESPACES; do | |
kubectl label Namespace "${namespace}" app.kubernetes.io/menganito=fue-a-por-pan | |
kubectl label Namespace "${namespace}" app.kubernetes.io/menganito- | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment