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