Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
K

kubesql

> 云原生
Open source

Experimental tool to query K8s API using plain SQL

187 stars0 likes1 views
WebsiteGitHub

About

Experimental tool to query K8s API using plain SQL

kubesql

kubesql, an experimental tool for querying your Kubernetes API Server using simple and smallest SQL syntax.

bash
$ kubesql -q "SELECT namespace FROM context WHERE pod.status.phase = 'Running'"

Installation

Docker

bash
$ docker pull furkanturkal/kubesql:0.1.0

From Source

bash
$ cargo install --path . # local
# - or -
$ cargo install --git https://github.com/Dentrax/kubesql # remote

Usage

bash
USAGE:
    kubesql [OPTIONS]

FLAGS:
    -h, --help       Prints help information
    -V, --version    Prints version information

OPTIONS:
    -f, --file       
    -q, --query 

Evaluate

bash
$ kubesql --file ./kube.sql
$ kubesql --query "SELECT namespace FROM context WHERE pod.status.phase = 'Running'"

With Docker

bash
$ docker container run -v ~/.kube/config/:/home/nonroot/.kube/config kubesql:0.1.0 --query "SELECT namespace FROM context WHERE pod.status.phase = 'Running'"

Quick Start

SQL Syntax

Single Context

sql
SELECT namespace
FROM context
WHERE pod.status.phase = 'Running'

Multiple Context-Namespace

sql
SELECT namespace1, namespace2
FROM context1, context2
WHERE pod.status.phase = 'Running' AND deployment.metadata.name = 'my-awesome-deployment'

Supported Statements

STATEMENT REQUIRED
SELECT ✓
FROM ✓
WHERE ✓

Supported Operators

OPERATOR WHERE ACTION
AND ✓ Panic if no result found
OR ✓ Continue

Special Thanks

Package Author License
sqlparser ballista-compute Apache License 2.0
kube clux Apache License 2.0
prettytable phsym MIT
  • Thanks to everyone who contributed these libraries and others that made this project possible.

License

kubesql was created by Furkan 'Dentrax' Türkal

The base project code is licensed under MIT unless otherwise specified. Please see the LICENSE file for more information. Best Regards

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Rustkubectlkubectl-pluginkubernetesrust

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 18, 2026
Category云原生
PricingOpen source

> Related tools

K
Kubernetes
容器编排事实标准
H
Helm
Kubernetes 包管理器
S
seaweedfs
SeaweedFS is a distributed storage system for object storage (S3), file systems, and Iceberg tables,