kubectl-context-list
Download
#!/bin/sh

# Usage:
# $ kubectl context list

# set -x # verbose
set -o pipefail # exit on pipeline error
set -e # exit on error
set -u # variable must exist

kubectl config get-contexts -o name