Skip to content
Snippets Groups Projects
2022-03-25-label-ns-with-name.sh 159 B
Newer Older
Pierre Ozoux's avatar
Pierre Ozoux committed
#!/bin/bash -eu

for NS in `kubectl get ns -A --no-headers -o custom-columns=":metadata.name"`; do
  echo $NS
  kubectl label --overwrite ns/$NS name=$NS
done