diff --git a/.functions/kubernetes.sh b/.functions/kubernetes.sh index 29a4cf0..3138fcc 100644 --- a/.functions/kubernetes.sh +++ b/.functions/kubernetes.sh @@ -58,5 +58,9 @@ function validate_private_ingress(){ function k8s_list_deprecation_apis(){ #Prints all api deprecation warnings in cluster + if ! command -v prom2json > /dev/null; then + printf "You need prom2json for this function: https://github.com/prometheus/prom2json\n" + return 1 + fi kubectl get --raw /metrics | prom2json | jq -c '.[] | select(.name=="apiserver_requested_deprecated_apis").metrics[].labels' | column -t -s'{}[],"' }