Giter Site home page Giter Site logo

swipswaps / node-red-contrib-kubernetes-client Goto Github PK

View Code? Open in Web Editor NEW

This project forked from travisghansen/node-red-contrib-kubernetes-client

0.0 1.0 0.0 177 KB

Node-RED node for interacting with Kubernetes clusters

License: MIT License

HTML 30.73% JavaScript 69.27%

node-red-contrib-kubernetes-client's Introduction

node-red-contrib-kubernetes-client

A Node-RED node that supports interacting with Kubernetes API via watches and HTTP requests.

GitHub

Install

npm install --save node-red-contrib-kubernetes-client

Documentation

The nodes are properly documented in Node-RED itself. In short there are 2 nodes:

  • kubernetes-client-watch - produces messages for configured watch endpoints.
  • kubernetes-client-http - allows complete interaction with Kubernetes API via ALL HTTP endpoints and verbs etc.

Watches ouput a msg.payload with the following structure (as a json object in Node-RED but shared here as yaml for readability):

# example event
---
type: ADDED || MODIFIED || DELETED || ERROR
object:
  kind: ...
  apiVersion: ...
  metadata:
    ...
  ...

# example error
---
type: ERROR
object:
  kind: Status
  apiVersion: v1
  metadata: {}
  status: Failure
  message: 'too old resource version: 1 (78390381)'
  reason: Gone
  code: 410

msg.payload.object contains the full resource from Kubernetes.

Development

Some helpful command variants for testing/developing:

# show event output structure
kubectl -v6 get nodes --watch --output-watch-events -o yaml

# manually specify URL
kubectl -v6 get --raw '/api/v1/nodes?resourceVersion=1&watch=true'

# watch response error structure
---
type: ERROR
object:
  kind: Status
  apiVersion: v1
  metadata: {}
  status: Failure
  message: 'too old resource version: 1 (78383979)'
  reason: Gone
  code: 410

License

See license (MIT).

node-red-contrib-kubernetes-client's People

Contributors

travisghansen avatar dependabot[bot] avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.