/kube-client-micro

Kube Client using GoDaddies NodeJS Library adapted to the awesome Micro Library

Primary LanguageHTMLMIT LicenseMIT

Kube-Client

NodeJS/Micro-based Client API to interact with Kubernetes API

Build Status contributions welcome HitCount Greenkeeper badge

Tests

$ npm test

Usage

$ npm install
$ export NODE_ENV="development"
$ export AUTH0_DOMAIN="<your domain>.eu.auth0.com"
$ npm start dev

Deployment

This microservice can be pulled in from Dockerhub with

docker pull meshfields/kube-client-micro

Prod mode to be launched with NODE_ENV=production npm start.

Config Modes

Development Mode will use your local kube config.

Production Mode will use in-cluster config from your Kube API.

API

Working:

GET /namespaces
GET /{NAMESPACE}/pods
GET /{NAMESPACE}/deployments

Authentication

Make sure to send a bearer token along in the header to get authenticate against Auth0.

curl --request GET --url 'http://localhost:3001/default/pods' --header 'authorization: Bearer {BEARER}' --header 'content-type: application/json'

License

MIT © 2018 by SteveK