Query Kubernetes API objects using SQL.
Switch branches/tags
Nothing to show
Clone or download
Latest commit 3730162 Nov 14, 2016

README.md

KSQL - A simple tool for interactive database queries on Kubernetes resources.

Prerequisites:

npm install q
npm install alasql
npm install node-kubernetes-client
npm install readline-history
npm install cli-table2
npm install js-yaml

Running:

kubectl proxy &
node ksql.js

Example Queries:

select count(*) from containers where containers.image like 'mysql%'
select count(*),image from containers where containers.image like 'mysql%' group by image
select pods.metadata->name,pods.metadata->annotations->email,image from pods join containers using uid where image like 'mysql:5.5%'
select pods.metadata->name,image from pods left join containers using uid where image like 'mysql%' and not pods.metadata->annotations->email