{"id":19099502,"url":"https://github.com/dentrax/kubesql","last_synced_at":"2025-08-22T03:32:27.864Z","repository":{"id":103621518,"uuid":"353353593","full_name":"Dentrax/kubesql","owner":"Dentrax","description":"Experimental tool to query K8s API using plain SQL","archived":false,"fork":false,"pushed_at":"2022-01-28T23:08:16.000Z","size":529,"stargazers_count":188,"open_issues_count":2,"forks_count":11,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-04-08T21:51:17.241Z","etag":null,"topics":["kubectl","kubectl-plugin","kubernetes","rust","sql","sql-parsing","sql-syntax"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/Dentrax.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":"ROADMAP.md","authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-03-31T12:44:56.000Z","updated_at":"2025-02-10T03:02:24.000Z","dependencies_parsed_at":"2023-06-26T00:06:43.889Z","dependency_job_id":null,"html_url":"https://github.com/Dentrax/kubesql","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/Dentrax/kubesql","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dentrax%2Fkubesql","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dentrax%2Fkubesql/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dentrax%2Fkubesql/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dentrax%2Fkubesql/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Dentrax","download_url":"https://codeload.github.com/Dentrax/kubesql/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dentrax%2Fkubesql/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271579435,"owners_count":24784250,"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","status":"online","status_checked_at":"2025-08-22T02:00:08.480Z","response_time":65,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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","kubectl-plugin","kubernetes","rust","sql","sql-parsing","sql-syntax"],"created_at":"2024-11-09T03:51:01.273Z","updated_at":"2025-08-22T03:32:27.525Z","avatar_url":"https://github.com/Dentrax.png","language":"Rust","readme":"\u003cp align=\"center\"\u003e\u003ca href=\"https://github.com/Dentrax/kubesql\" target=\"_blank\"\u003e\u003cimg height=\"128\" src=\"https://raw.githubusercontent.com/Dentrax/kubesql/main/.res/logo.png\"\u003e\u003c/a\u003e\u003c/p\u003e\n\n\u003ch1 align=\"center\"\u003ekubesql\u003c/h1\u003e\n\n\u003cdiv align=\"center\"\u003e\n \u003cstrong\u003e\n   An experimental tool for querying your Kubernetes API Server using SQL\n \u003c/strong\u003e\n\u003c/div\u003e\n\n\u003cbr /\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://opensource.org/licenses/MIT\"\u003e\u003cimg src=\"https://img.shields.io/badge/License-MIT-blue.svg?style=flat-square\" alt=\"MIT\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/Dentrax/kubesql/releases/latest\"\u003e\u003cimg src=\"https://img.shields.io/github/release/Dentrax/kubesql.svg?style=flat-square\" alt=\"GitHub release\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cbr /\u003e\n\n*kubesql*, an experimental tool for querying your Kubernetes API Server using simple and smallest SQL syntax.\n\n```bash\n$ kubesql -q \"SELECT namespace FROM context WHERE pod.status.phase = 'Running'\"\n```\n![Screenshot](.res/screenshot.png)\n\n# Installation\n\n## Docker\n```bash\n$ docker pull furkanturkal/kubesql:0.1.0\n```\n\n## From Source\n```bash\n$ cargo install --path . # local\n# - or -\n$ cargo install --git https://github.com/Dentrax/kubesql # remote\n```\n\n# Usage\n\n[![asciicast](https://asciinema.org/a/407398.svg)](https://asciinema.org/a/407398)\n\n```bash\nUSAGE:\n    kubesql [OPTIONS]\n\nFLAGS:\n    -h, --help       Prints help information\n    -V, --version    Prints version information\n\nOPTIONS:\n    -f, --file \u003cFILE\u003e      \n    -q, --query \u003cquery\u003e\n```\n\n## Evaluate\n```bash\n$ kubesql --file ./kube.sql\n$ kubesql --query \"SELECT namespace FROM context WHERE pod.status.phase = 'Running'\"\n```\n\n### With Docker\n```bash\n$ docker container run -v ~/.kube/config/:/home/nonroot/.kube/config kubesql:0.1.0 --query \"SELECT namespace FROM context WHERE pod.status.phase = 'Running'\"\n```\n\n# Quick Start\n\n## SQL Syntax\n\n### Single Context\n```sql\nSELECT namespace\nFROM context\nWHERE pod.status.phase = 'Running'\n```\n\n### Multiple Context-Namespace\n```sql\nSELECT namespace1, namespace2\nFROM context1, context2\nWHERE pod.status.phase = 'Running' AND deployment.metadata.name = 'my-awesome-deployment'\n```\n\n### Supported Statements\n| STATEMENT | REQUIRED |\n|-----------|----------|\n| SELECT    | ✓        |\n| FROM      | ✓        |\n| WHERE     | ✓        |\n\n### Supported Operators\n| OPERATOR | WHERE | ACTION                   |\n|----------|-------| ------------------------ |\n| AND      | ✓     | Panic if no result found |\n| OR       | ✓     | Continue                 |\n\n# Special Thanks\n\n| Package                                                       | Author                                                  | License                                                                                      |\n| :------------------------------------------------------------ | :------------------------------------------------------ | :------------------------------------------------------------------------------------------- |\n| [sqlparser](https://github.com/ballista-compute/sqlparser-rs) | [ballista-compute](https://github.com/ballista-compute) | [Apache License 2.0](https://github.com/ballista-compute/sqlparser-rs/blob/main/LICENSE.TXT) |\n| [kube](https://github.com/clux/kube-rs)                       | [clux](https://github.com/clux)                         | [Apache License 2.0](https://github.com/clux/kube-rs/blob/master/LICENSE)                    |\n| [prettytable](https://github.com/phsym/prettytable-rs)        | [phsym](https://github.com/phsym)                       | [MIT](https://github.com/phsym/prettytable-rs/blob/master/LICENSE.txt)                       |\n\n- Thanks to everyone who contributed these libraries and [others](https://github.com/Dentrax/kubesql/blob/master/Cargo.toml) that made this project possible.\n\n# License\n\n*kubesql* was created by Furkan 'Dentrax' Türkal\n\nThe base project code is licensed under [MIT](https://opensource.org/licenses/MIT) unless otherwise specified. Please see the **[LICENSE](https://github.com/Dentrax/kubesql/blob/master/LICENSE)** file for more information.\n\n[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2FDentrax%2Fkubesql.svg?type=large)](https://app.fossa.com/projects/git%2Bgithub.com%2FDentrax%2Fkubesql?ref=badge_large)\n\n\u003ckbd\u003eBest Regards\u003c/kbd\u003e\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdentrax%2Fkubesql","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdentrax%2Fkubesql","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdentrax%2Fkubesql/lists"}