ncp-flat-kubeconfig
: Flat kubeconfig for NKS
ncp-flat-kubeconfig
DEMO
Prerequisite
Yaml Parser(yq)
Environment
Support only NKS(Naver Kubernetes Serivce)
Purpose
NKS's kubeconfig name is duplicated. And it doesn't support to flat kubeconfig function yet. Thus use to flat and rename the kubeconfig.
Usage
kubeconfig.yaml is hard coded due to it fixed If it needs, I will change it.
$ ncp-flat-kubeconfig
successfully flatting NKS's kubeconfig
Check
$ kubectl config get-contexts
CURRENT | NAME | CLUSTER | AUTHINFO | NAMESPACE
---- | ---- | ---- | ---- | ----
* | nks | kubernetes | kubernetes-admin |
| nks-0346 | nks-KR-0346 | nks-user |
Installation
One time runner
kubeconfig.yaml
must be in a same folder
curl https://raw.githubusercontent.com/sysnet4admin/ncp-flat-kubeconfig/main/ncp-flat-kubeconfig | bash
Installation (macOS and Linux)
curl https://raw.githubusercontent.com/sysnet4admin/ncp-flat-kubeconfig/main/install | bash