From 3b1008901bce2a92f89e12c773b4dd5c53d0a8f8 Mon Sep 17 00:00:00 2001 From: Patrick Spek Date: Mon, 11 Oct 2021 15:08:05 +0200 Subject: Add small kubectl script to show all hostnames served by a namespace --- .local/bin/kubectl-hosts | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100755 .local/bin/kubectl-hosts diff --git a/.local/bin/kubectl-hosts b/.local/bin/kubectl-hosts new file mode 100755 index 0000000..c347256 --- /dev/null +++ b/.local/bin/kubectl-hosts @@ -0,0 +1,6 @@ +#!/bin/sh + +kubectl get ing -o custom-columns=:.spec.rules[].host \ + | grep . \ + | sort \ + | uniq -- cgit v1.1