Skip to content

brendandburns/ksql

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Query Kubernetes API objects using SQL.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •