Skip to content

Instantly share code, notes, and snippets.

@MikeJansen
MikeJansen / extract_kubecfg_cert.sh
Last active December 15, 2022 14:35 — forked from xueshanf/extract_kubecfg_cert.sh
Extract kubernetes cluster credentials from kubecfg
#!/bin/bash
# Input: ./extract_kubecfg_cert.sh my-cluster-name username
# Output: ./my-cluster-name-ca.crt ./username.crt ./username.key
# Exit on error
abort(){
echo $1 && exit 1
}
# Prerequistes