百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
K

kubesql

> 云原生
开源

使用纯 SQL 查询 K8s API 的实验工具

187 stars0 点赞1 次浏览
访问官网GitHub

工具介绍

使用纯 SQL 查询 K8s API 的实验工具

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 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Rustkubectlkubectl-pluginkubernetesrust

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类云原生
定价开源

> 相关工具

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