NodeJS/Micro-based Client API to interact with Kubernetes API
$ npm test
$ npm install
$ export NODE_ENV="development"
$ export AUTH0_DOMAIN="<your domain>.eu.auth0.com"
$ npm start dev
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
.
Development Mode will use your local kube config.
Production Mode will use in-cluster config from your Kube API.
Working:
GET /namespaces
GET /{NAMESPACE}/pods
GET /{NAMESPACE}/deployments
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'
MIT © 2018 by SteveK