Add and remove kubeconfigs from the main config file
Info: With unspecified config file (-c / --config) default value is used (~/.kube/config)
kubecnf [-c /path/to/main/config] add /path/to/new/cluster/config
kubecnf [-c /path/to/main/config] remove cluster-name
kubecnf [-c /path/to/main/config] list
kubecnf [-c /path/to/main/config] rollback
To enable bash completion, source the provided completion script:
source <(kubecnf completion)
To make it permanent, add the above line to your ~/.bashrc
file.
- Clone the repository
- Build the binary:
go build -o kubecnf
- Move the binary to a directory in your PATH, e.g.:
sudo mv kubecnf /usr/local/bin/
Alternatively, you can download the pre-built binary directly from the GitHub release page rename it and move it to your PATH as shown above.