Edit on GitHub

Namespaces

Filter all ns on name

Using custom-columns:

kubectl get ns -A -o custom-columns="NAMESPACE:.metadata.name" --no-headers

Using jsonpath:

kubectl get ns -A -o jsonpath="{.items[*].metadata.name}"