How to merge kubectl config file with ~/.kube/config?

前端 未结 6 927
你的背包
你的背包 2020-12-07 16:27

Is there a simple kubectl command to take a kubeconfig file (that contains a cluster+context+user) and merge it into the ~/.kube/config file as an

6条回答
  •  Happy的楠姐
    2020-12-07 17:07

    If you find yourself doing this a lot... There is now also the krew plugin package manager for kubectl.

    The krew plugin "konfig" can help you manage your ~/.kube/config file.

    Using the konfig plugin the syntax will be:

    kubectl konfig import -s new.yaml

    To install krew: https://github.com/kubernetes-sigs/krew

    To install konfig: kubectl krew install konfig

提交回复
热议问题