Skip to content

kosli-dev/k8sconfigdump

Repository files navigation

Tracking kubernetes configmaps with kosli

  1. download configmaps
  2. filter out generated fields in configmaps
  3. snapshot

1. Download configmaps

gcloud container clusters get-credentials autopilot-cluster-1 --region us-central1 --project test-kubernetes-environment

# Download Configmaps
./1-download-configmaps.sh -o snapdir gamestore

# Download CRDs
./1-download-configmaps.sh -o snapdir -c gamestore

2. Filter configmaps

source env/bin/activate

mkdir /tmp/snapdir
python src/filter_configmaps.py /tmp/snapdir

3. Snapshot downloaded configs

kosli snapshot server kubernetes-configurations \
  --paths "/tmp/snapdir/*"

Running the tests

pytest

About

Example of recording configmaps managed by Google Cloud ConfigSync

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published