CLI tool and consumable library that supports download and upload operations which download objects from a k8s cluster into a local directory and upload objects from that local directory into a target k8s cluster.
Useful to load "test" clusters with "real" world cluster objects with minimal latency.
- Install:
go install github.com/elankath/kcpcl
- See help:
kcpcl -h
Use the Makefile
targets
- See Available Make Targets:
make help
- GARDNER CLUSTERS: Generate viewer kubeconfigs for a cluster:
make genkubeconfig
- Requres
LANDSCAPE
,PROJECT
andSHOOT
env variables to be set. - This creates viewer kubeconfigs for a cluster and downloads them into the
gen
folder.
- Requres
- Build Binary:
make build
- Execute Download:
./bin/kcpcl -k gen/<cluster-name>.yaml -d /tmp/<cluster-name>
- Uses a default list of GVR that allow the kube-scheduler to successfully assign pods to nodes.
- Example:
./bin/kcpcl download -k gen/garden-i034796--aw-external.yaml -d /tmp/aw
- Execute Upload:
./bin/kcpcl -k gen/<cluster-name>.yaml -d /tmp/<cluster-name>
- Example:
./bin/kcpcl upload -k /tmp/kvcl.yaml -d /tmp/aw
#Using virtual cluster from https://github.com/unmarshall/kvcl
- Example: