{"id":46971859,"url":"https://github.com/ltmleo/k8s-clean-yaml","last_synced_at":"2026-03-11T11:54:08.275Z","repository":{"id":199376234,"uuid":"496646150","full_name":"ltmleo/k8s-clean-yaml","owner":"ltmleo","description":"Clean useless fields in kubernetes manifests","archived":false,"fork":false,"pushed_at":"2025-03-07T15:58:04.000Z","size":7,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-07T16:38:04.536Z","etag":null,"topics":["kubectl","kubernetes","manifest","python","python3","yaml"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ltmleo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2022-05-26T14:11:27.000Z","updated_at":"2025-03-07T15:58:07.000Z","dependencies_parsed_at":null,"dependency_job_id":"1bfdc45c-27d0-423a-ac51-da2f89b72873","html_url":"https://github.com/ltmleo/k8s-clean-yaml","commit_stats":null,"previous_names":["ltmleo/k8s-clean-yaml"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ltmleo/k8s-clean-yaml","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ltmleo%2Fk8s-clean-yaml","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ltmleo%2Fk8s-clean-yaml/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ltmleo%2Fk8s-clean-yaml/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ltmleo%2Fk8s-clean-yaml/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ltmleo","download_url":"https://codeload.github.com/ltmleo/k8s-clean-yaml/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ltmleo%2Fk8s-clean-yaml/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30380831,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-11T06:09:32.197Z","status":"ssl_error","status_checked_at":"2026-03-11T06:09:17.086Z","response_time":84,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["kubectl","kubernetes","manifest","python","python3","yaml"],"created_at":"2026-03-11T11:54:07.632Z","updated_at":"2026-03-11T11:54:08.270Z","avatar_url":"https://github.com/ltmleo.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# k8s-clean-yaml\nClean useless fields in kubernetes manifests\n\n## Download and Install\n\n```bash\ngit clone https://github.com/ltmleo/k8s-clean-yaml.git\ncd k8s-clean-yaml\npip install -r requirements.txt\nsudo ln -s $(pwd)/clean-yaml.py /usr/local/bin/cleanyaml\n```\n\n## Dependencies\n- python: \u003e= 3.6\n- PyYAMl: \u003e= 5.3.1\n\n## How to use\nKubernetes have a ton of useless fields in manifests, to clean these fields, you can execute:\n`kubectl get pods -o yaml | cleanyaml`\nor\n`cleanyaml manifest.yaml`\n\n## Remove custom fiels\nTo remove custom fields you just need to add them to `FIELDS_TO_RM` dictionary.\n\nBy default this fields are being removed:\n```json\n{\n\"metadata\": {\n    \"annotations\": {\n        \"kubectl.kubernetes.io/last-applied-configuration\": \" \",\n        \"autoscaling.alpha.kubernetes.io/conditions\": \" \",\n        \"control-plane.alpha.kubernetes.io/leader\": \" \"\n    },\n    \"generation\": \" \",\n    \"creationTimestamp\": \" \",\n    \"resourceVersion\": \" \",\n    \"selfLink\": \" \",\n    \"uid\": \" \",\n    \"managedFields\": \" \"\n},\n\"spec\": {\n    \"clusterIP\": \" \",\n    \"clusterIPs\": \" \",\n    \"finalizers\": \" \"\n},\n\"status\": \" \"\n}\n```\n\n\n## Colaborate\nAll ideas and improvements are welcome!!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fltmleo%2Fk8s-clean-yaml","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fltmleo%2Fk8s-clean-yaml","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fltmleo%2Fk8s-clean-yaml/lists"}