weskan / kubectl-import

Tool for importing and merging kubectl configuration files

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Kubectl-import

kubectl-import is a tool for importing and merging kubectl configuration files.

The imported files can be raw configuration files or base64-encoded versions of those files. Base64 is helpful for sharing using tools that impose maximum line size.

Using

$ kubectl-import ~/Downloads/cluster-kubectl-config

The specified file(s) are merged back to your kubectl config file - ~/.kube/config by default, unless KUBECONFIG environment variable is set.

In order to write output to a different file, simply set KUBECONFIG variable - such as:

$ KUBECONFIG=/tmp/kubectl-merged kubectl-import ~/.kube/config ~/Downloads/cluster-kubectl-config

Installing

Simply download the script to a directory in your path. For example:

sudo curl -o /usr/local/bin/kubectl-import https://raw.githubusercontent.com/bitnami-labs/kubectl-import/master/kubectl-import && sudo chmod 0755 /usr/local/bin/kubectl-import

About

Tool for importing and merging kubectl configuration files

License:BSD 2-Clause "Simplified" License


Languages

Language:Shell 100.0%