{"id":18672976,"url":"https://github.com/projectsyn/k8s-object-dumper","last_synced_at":"2025-04-12T01:31:21.296Z","repository":{"id":37034687,"uuid":"302265624","full_name":"projectsyn/k8s-object-dumper","owner":"projectsyn","description":"Kubernetes object dumper for use as a pre backup command in K8up.","archived":false,"fork":false,"pushed_at":"2025-04-11T11:40:49.000Z","size":88,"stargazers_count":3,"open_issues_count":6,"forks_count":0,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-04-11T13:15:00.970Z","etag":null,"topics":["backup","backup-script","backup-tool","backup-utility","k8up","kubernetes","openshift","vshn-team-aldebaran"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/projectsyn.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-10-08T07:36:49.000Z","updated_at":"2024-11-15T13:42:13.000Z","dependencies_parsed_at":"2025-03-24T18:24:18.126Z","dependency_job_id":"8091780e-3be5-4016-99fb-8bb847b4d7bb","html_url":"https://github.com/projectsyn/k8s-object-dumper","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/projectsyn%2Fk8s-object-dumper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/projectsyn%2Fk8s-object-dumper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/projectsyn%2Fk8s-object-dumper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/projectsyn%2Fk8s-object-dumper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/projectsyn","download_url":"https://codeload.github.com/projectsyn/k8s-object-dumper/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248504243,"owners_count":21115138,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["backup","backup-script","backup-tool","backup-utility","k8up","kubernetes","openshift","vshn-team-aldebaran"],"created_at":"2024-11-07T09:13:36.429Z","updated_at":"2025-04-12T01:31:21.289Z","avatar_url":"https://github.com/projectsyn.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# K8s Object Dumper\n\nDiscover and dump all listable objects from a Kubernetes cluster into JSON files.\nWritten to be used as a pre backup command for [K8up](https://k8up.io).\n\n## Usage\n\nThe project uses controller-runtime's configuration discovery to find the Kubernetes API server.\n\n\n\n### Dump to STDOUT\n\n```bash\n$ k8s-object-dumper\n{\"apiVersion\":\"v1\",\"kind\":\"List\",\"items\":[{\"apiVersion\":\"v1\", ...}]}\n{\"apiVersion\":\"v1\",\"kind\":\"List\",\"items\":[{\"apiVersion\":\"apps/v1\", ...}]}\n```\n\n### Dump to a directory\n\n```bash\n$ k8s-object-dumper -dir dir\n```\n\nWill result in the following directory structure:\n\n```\n└─ dir/\n   ├─ objects-\u003ckind\u003e[.\u003cgroup\u003e].json\n   ├─ …\n   └─ split/\n      ├─ \u003cnamespace\u003e/\n      |  ├─ __all__.json\n      |  ├─ \u003ckind\u003e[.\u003cgroup\u003e].json\n      |  └─ …\n      └─ …\n```\n\n### Advanced usage\n\n```bash\n# Fail if a Pods, Deployments or AlertingRules are not found\n$ k8s-object-dumper \\\n  -must-exist=pods \\\n  -must-exist=deployments.apps \\\n  -must-exist=alertingrules.monitoring.openshift.io\n# Ignore all Secrets and all cert-manager objects\n$ k8s-object-dumper \\\n  -ignore=secrets \\\n  -ignore=.+cert-manager.io\n```\n\n## Development\n\nThe project uses [envtest](https://book.kubebuilder.io/reference/envtest) to run tests against a real Kubernetes API server.\n\n```bash\n$ make test\n```\n\n## Differences to the original `bash` version `\u003c 0.3.0`\n\n- All APIs are fully qualified in both the options (`--must-exist=certificates.cert-manager.io`, `--ignore=deployment.apps`) and the output files (`objects-Certificate.cert-manager.io.json`).\n  This makes it possible to distinguish between objects with the same kind but different groups. See https://github.com/projectsyn/k8s-object-dumper/issues/47.\n- Resources without a list endpoint are ignored, do not cause an error, and don't need to be explicitly ignored.\n- Ignore and must-exist options are now command line flags instead of files in `/usr/local/share`.\n\n## Contributing and license\n\nThis library is licensed under [BSD-3-Clause](LICENSE).\nFor information about how to contribute see [CONTRIBUTING](CONTRIBUTING.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprojectsyn%2Fk8s-object-dumper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprojectsyn%2Fk8s-object-dumper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprojectsyn%2Fk8s-object-dumper/lists"}