{"id":15097614,"url":"https://github.com/gmeghnag/koff","last_synced_at":"2025-04-14T23:09:20.925Z","repository":{"id":166336105,"uuid":"641800087","full_name":"gmeghnag/koff","owner":"gmeghnag","description":"Inspect Kubernetes yaml/json manifests and etcd snapshot offline with koff!","archived":false,"fork":false,"pushed_at":"2025-01-05T19:57:41.000Z","size":18723,"stargazers_count":36,"open_issues_count":1,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-14T23:08:53.931Z","etag":null,"topics":["cli","kubernetes","openshift","yaml"],"latest_commit_sha":null,"homepage":"https://gmeghnag.github.io/koff","language":"Go","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/gmeghnag.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-05-17T07:36:45.000Z","updated_at":"2025-04-09T10:53:46.000Z","dependencies_parsed_at":"2024-11-27T23:42:01.542Z","dependency_job_id":null,"html_url":"https://github.com/gmeghnag/koff","commit_stats":{"total_commits":41,"total_committers":2,"mean_commits":20.5,"dds":"0.19512195121951215","last_synced_commit":"8f6bcf77bb6bb7b0858952a64a162cd66fca803c"},"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gmeghnag%2Fkoff","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gmeghnag%2Fkoff/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gmeghnag%2Fkoff/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gmeghnag%2Fkoff/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gmeghnag","download_url":"https://codeload.github.com/gmeghnag/koff/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248975315,"owners_count":21192210,"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":["cli","kubernetes","openshift","yaml"],"created_at":"2024-09-25T16:24:03.503Z","updated_at":"2025-04-14T23:09:15.908Z","avatar_url":"https://github.com/gmeghnag.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# `koff`\n[![GitHub Actions Build Status](https://github.com/gmeghnag/koff/actions/workflows/build.yml/badge.svg)](https://github.com/gmeghnag/koff/actions?query=workflow%3ABuild)\n![Downloads](https://img.shields.io/github/downloads/gmeghnag/koff/total)\n\u003cimg src=\"./docs/images/preview.png\" width=\"100%\"\u003e\n\n`koff` is a command-line tool that processes Kubernetes `yaml|json` manifests and returns their appropriate tabular format, as well as `yaml` or `json`.\n\n## **¿What?**\nIt allows you to process Kubernetes resources in `yaml` or `json` format, from either file or piped input or etcd snapshot file.\u003cbr /\u003e\nIt reads input, performs the specific filter operations based on the flags and arguments (if provided), and writes the output in either tabular (as default), `json` or `yaml` format. \n\n## **¿Why?**\nHelpful in conjunction with `kubectl` to take a \"snapshot\" of specific resources at that specific point in time and parse the same later on.\n\n## **¿How?**\n- Via piped input:\n  ```\n  $ cat resources.yaml | koff get pod/postgresql-1-2gxpm svc/postgresql\n  NAME                     READY   STATUS    RESTARTS   AGE\n  pod/postgresql-1-2gxpm   1/1     Running   0          15m\n\n  NAME                 TYPE        CLUSTER-IP      EXTERNAL-IP   PORT(S)    AGE\n  service/postgresql   ClusterIP   172.30.58.223   \u003cnone\u003e        5432/TCP   16m\n  ```\n- Referencing the file to use via `koff use \u003cresources\u003e.yaml` before executing `koff`:\n  ```\n  $ koff use resources.yaml\n  $ koff get pod/postgresql-1-2gxpm svc/postgresql\n  NAME                     READY   STATUS    RESTARTS   AGE\n  pod/postgresql-1-2gxpm   1/1     Running   0          15m\n\n  NAME                 TYPE        CLUSTER-IP      EXTERNAL-IP   PORT(S)    AGE\n  service/postgresql   ClusterIP   172.30.58.223   \u003cnone\u003e        5432/TCP   16m\n  ```\n- Using an etcd snapshot to get the Kubernetes object contained in it:\n  ```\n  $ koff etcd inspect etcd_snap.db /kubernetes.io/pods/openshift-etcd/testocp-bqgqk-master-0-debug -o yaml\n  apiVersion: v1\n  kind: Pod\n  metadata:\n    annotations:\n      debug.openshift.io/source-container: container-00\n      debug.openshift.io/source-resource: /v1, Resource=nodes/testocp-bqgqk-master-0\n    creationTimestamp: \"1995-01-17T00:0:00Z\"\n    ...\n    ...\n\n  $ koff etcd inspect etcd_snap.db /kubernetes.io/pods/openshift-etcd/testocp-bqgqk-master-0-debug | koff\n  NAME                                    READY   STATUS    RESTARTS   AGE\n  pod/testocp-bqgqk-master-0-debug        0/1     Pending   0          22h\n\n  ```\n\n## Installation\n### Using `go`\n```\ngo install github.com/gmeghnag/koff \n```\n### Download the latest binary\n```\nOS=Linux        # or Darwin\ncurl -sL \"https://github.com/gmeghnag/koff/releases/latest/download/koff_${OS}_x86_64.tar.gz\" | tar xzf - koff\nchmod +x ./koff\n```\n### Build from source\n```\n$ git clone https://github.com/gmeghnag/koff.git\n$ cd koff/\n$ go install\n```\n\n## Upgrade\nIt's possible to upgrade the tool to the latest version by running `koff upgrade --to=latest`\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgmeghnag%2Fkoff","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgmeghnag%2Fkoff","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgmeghnag%2Fkoff/lists"}