A jQuery like library for manipulating kubernetes objects across various popular kubernetes platforms.
Problems that kQuery addresses:
- Easy to use client library that is accessible to a wide range of developers (javascript/jQuery)
- Consistent client library across inconsistent kubernetes implementations (abstracts the differences between EKS/AKS/GKE/Tectonic etc)
- Simplify building long running custom controllers or operators on k8s
// jQuery like selector syntax
var pod = $('pod[name=my-pod]');
// supports events
pod.on( 'status-change', function( event ) {
$('service', {
name: 'expose-pod',
label-selector: 'name=my-pod'
)).create(event.namespace);
});
// supports chaining
$('namespace[name=default]').find('pod').delete();
// is aware of cluster compatibility
if ( $.kubernetes.tectonic ) {
console.log('this is CoreOS Tectonic!');
} else if ( $.kubernetes.aks ) {
console.log('Azure ftw!');
}
This is a really cool idea. I have seen lots of users, developers, and customers just use kubectl and shell scripts as a poor man's version of this.