- Sponsor: nearForm
- Node: 4.x, 6.x
- Seneca: 3.x
This plugin helps in running seneca on a kubernetes cluster.
At the moment its main function is loading some useful data from the cluster: current pod id and list of pods.
It must be run from inside a kubernetes pod to work
If you're using this module, and need help, you can:
- Post a github issue,
- Tweet to @senecajs,
- Ask on the Gitter.
If you are new to Seneca in general, please take a look at senecajs.org. We have everything from tutorials to sample apps to help get you up and running quickly.
npm install -i seneca-kubernetes
Usage is simple: register the plugin and you'll find the data among the seneca options:
var seneca = Seneca().use('kubernetes')
seneca.ready(function () {
console.log(seneca.options().plugin.kubernetes)
})
Returned data will include:
{
myip: '10.244.2.5', // ip of current container and pod
pods: [{
status: 'Running', // pod status
ip: '10.244.2.6', // pod ip
labels: { // labels as defined on the pod
app: 'seneca-demo',
version: '1'
}
}]
}
No tests available at the moment
The Senecajs org encourage open participation. If you feel you can help in any way, be it with documentation, examples, extra testing, or new features please get in touch.
Copyright (c) 2013 - 2016, Richard Rodger and other contributors. Licensed under MIT.