https://github.com/debianmaster/openshift-client
OpenShift nodejs client library
https://github.com/debianmaster/openshift-client
Last synced: about 1 year ago
JSON representation
OpenShift nodejs client library
- Host: GitHub
- URL: https://github.com/debianmaster/openshift-client
- Owner: debianmaster
- License: mit
- Created: 2017-06-07T15:54:16.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2017-09-03T05:09:37.000Z (almost 9 years ago)
- Last Synced: 2025-03-27T02:07:23.141Z (over 1 year ago)
- Language: JavaScript
- Size: 9.77 KB
- Stars: 5
- Watchers: 2
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
> This openshift-client library is based on godaddy/kubernetes-client library, created by https://github.com/silasbw I will be maintaing it. Let me know if any objects are missing.
## Using
```js
const OpenShiftClient = require('openshift-client');
// Get Deployments from a specific namespace
const oapi = new OpenShiftClient.OApi(OpenShiftClient.config.fromKubeconfig());
oapi.ns('foo').deploymentconfigs('bar').get((err, result) => {
if (err) throw err;
console.log(JSON.stringify(result, null, 2));
});
// Watch Deployment Events across all namespaces.
const streamDC = oapi.deploymentconfigs.get({ qs: { watch: true } });
const JSONStream = require('json-stream');
const jsonStreamDC = new JSONStream();
streamDC.pipe(jsonStreamDC);
jsonStreamDC.on('data', object => {
console.log('DC:', JSON.stringify(object, null, 2));
});
```
> For more examples refer https://github.com/godaddy/kubernetes-client
## More documentation?
https://github.com/godaddy/kubernetes-client/blob/master/README.md