Combine several kubeconfigs together in one file!
There are three main ways to build this:
- good old go build
- The nix way (including the nix docker way)
- The Docker way
go build -o kubecombine cmd/kubecombine/combine.go
build a binary directly with:
nix build
The binary will then exist at:
result/bin/kubecombine
OR you can build a docker image and load it with docker
nix build .#docker
docker load < result
Building can be accomplished with:
docker build . -t kubecombine
Pass in two or more kubeconfigs in as stdin and the program will combine and output the yaml to stdout.
docker run -v /path/to/configs:/configs kubecombine:latest /configs/config1.yaml /configs/config2.yaml