{"id":22620268,"url":"https://github.com/qba73/inspector","last_synced_at":"2025-04-11T15:32:52.027Z","repository":{"id":234173195,"uuid":"788383495","full_name":"qba73/inspector","owner":"qba73","description":"K8s plugin for running Ingress Controller diagnostics.","archived":false,"fork":false,"pushed_at":"2025-03-17T04:42:54.000Z","size":191,"stargazers_count":3,"open_issues_count":6,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-25T11:49:11.662Z","etag":null,"topics":["customer-support","diagnostic-tool","diagnostics","ingress-controller","kubectl","kubectl-plugins","kubernetes-tools","technical-support"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/qba73.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":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-04-18T10:02:36.000Z","updated_at":"2025-03-15T07:53:09.000Z","dependencies_parsed_at":"2024-05-17T07:44:14.948Z","dependency_job_id":"f6394995-4ad7-40c1-8e84-ec7bea558fde","html_url":"https://github.com/qba73/inspector","commit_stats":null,"previous_names":["qba73/inspector"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qba73%2Finspector","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qba73%2Finspector/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qba73%2Finspector/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qba73%2Finspector/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/qba73","download_url":"https://codeload.github.com/qba73/inspector/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248431828,"owners_count":21102275,"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":["customer-support","diagnostic-tool","diagnostics","ingress-controller","kubectl","kubectl-plugins","kubernetes-tools","technical-support"],"created_at":"2024-12-08T22:12:53.943Z","updated_at":"2025-04-11T15:32:52.005Z","avatar_url":"https://github.com/qba73.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Inspector\n\n[![Go Reference](https://pkg.go.dev/badge/github.com/qba73/inspector.svg)](https://pkg.go.dev/github.com/qba73/inspector)\n![GitHub go.mod Go version](https://img.shields.io/github/go-mod/go-version/qba73/inspector)\n[![Go Report Card](https://goreportcard.com/badge/github.com/qba73/inspector)](https://goreportcard.com/report/github.com/qba73/inspector)\n![GitHub](https://img.shields.io/github/license/qba73/inspector)\n[![Tests](https://github.com/qba73/inspector/actions/workflows/test.yml/badge.svg)](https://github.com/qba73/inspector/actions/workflows/test.yml)\n[![OpenSSF Best Practices](https://www.bestpractices.dev/projects/8889/badge)](https://www.bestpractices.dev/projects/8889)\n\n![Magical gopher logo](img/inspectork.png)\n\nBefore using `inspector` you need to have [kubectl](https://kubernetes.io/docs/tasks/tools/) binary installed and configured (config file `${HOME}/.kube/config`).\n\n`inspector` is a CLI tool and a [Kubernetes plugin](https://kubernetes.io/docs/tasks/extend-kubectl/kubectl-plugins/) for running Cluster and Ingress Conroller diagnostics, collecting Cluster and Ingress Controller logs and generating reports.\n\n## How to install `inspector`\n\n### How to install it and use as a CLI tool\n\n1) Install Go binary\n\n   ```shell\n   go install github.com/qba73/inspector/cmd/inspector@latest\n   ```\n\n1) Get help:\n\n   ```shell\n   inspector -h\n   ```\n\n   ```shell\n   Usage:\n\n      inspector [-v] [-h] [-n] \u003cnamespace\u003e\n\n   Collect K8s and NIC diagnostics in the given namespace\n\n   In verbose mode (-v), prints out progess, steps and all data points to stdout.\n   ```\n\n1) Collect data points from `default` namespace\n\n   ```shell\n   inspector -n default \u003e default.json\n   ```\n\n1) Collect data points from `nginx-ingress` namespace\n\n   ```shell\n   inspector -n nginx-ingress \u003e nginx-ingress.json\n   ```\n\n### How to install it and use as a `kubectl` plugin\n\n1) Clone the repo.\n1) Build inspector.\n\n   ```shell\n   go build -o kubectl-inspector ./cmd/inspector/main.go\n   ```\n\n1) Copy the binary to a dir in your `$HOME`, for example:\n\n   ```shell\n   cp kubectl-inspector /usr/local/bin/\n   ```\n\n1) Verify if the `kubectl` discovers the plugin:\n\n   ```shell\n   kubectl plugin list\n   ```\n\n   ```shell\n   [...]\n   /usr/local/bin/kubectl-inspector\n   ```\n\n1) Verify `inspector` can be run using `kubectl`:\n\n   ```shell\n   kubectl inspector -h\n\n   Usage:\n\n      inspector [-h] [-v] [-n] namespace\n\n   Collect K8s and Ingress Controller diagnostics in the given namespace.\n\n   In verbose mode (-v), prints out progess, steps and all data points to stdout.\n   ```\n\n1) Collect data points from `default` namespace\n\n   Note that `inspector`'s default namespace is `default`.\n\n   ```shell\n   kubectl inspector \u003e default.json\n   ```\n\n1) Collect data points from `nginx-ingress` namespace\n\n   ```shell\n   kubectl inspector -n nginx-ingress \u003e nginx-ingress.json\n   ```\n\n## How it works\n\nThe program collects K8s cluster and [NGINX Ingress Controller](https://kubernetes.io/docs/concepts/services-networking/ingress/) diagnostics data. It prints out data in the JSON format to the stdout. This allows the output to be piped to other tools (for example [jq](https://jqlang.github.io/jq/)) for further parsing and processing.\n\n## Collected data points\n\nCurrently `inspector` collects following data points:\n\n- K8s version\n- K8s cluster id\n- Number of nodes in the cluster\n- K8s platform name\n- Pods\n- Logs from pods\n- Events\n- ConfigMaps\n- Services\n- Deployments\n- StatefulSets\n- ReplicaSets\n- Leases\n- CRDs\n- IngressClasses\n- Ingresses\n- IngressAnnotations\n\nPlanned:\n\n- Nodes metrics\n- Ingress Controller stats, options and configuration\n\nFuture releases will add support for collecting [K8s Gateway API](https://kubernetes.io/docs/concepts/services-networking/gateway/) diagnostics.\n\n## Contributing\n\nIf you'd like to contribute to **Inspector**, please read the [Contributing guide](CONTRIBUTING.md).\n\nGopher image by [Gopherize.me](https://gopherize.me)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqba73%2Finspector","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fqba73%2Finspector","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqba73%2Finspector/lists"}