npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@kube-red/node-red-kube-red

v0.0.2

Published

A node-red node that supports interacting with kubernetes clusters (get, delete, create, list, watch, upsert)

Downloads

11

Readme

Kube RED

Kube-RED is a set of NodeRED nodes to interact with Kubernetes. It allows to automation of Kubernetes clusters with no or little code.

Installation

We provide a Helm chart to install Kube-RED in your Kubernetes cluster.

Kube-RED nodes

Currently, we provide the following nodes:

  • upsert - Create or update a Kubernetes resource
  • delete - Delete a Kubernetes resource
  • get - Get a Kubernetes resource
  • list - List Kubernetes resources
  • create - Create a Kubernetes resource
  • update - Update a Kubernetes resource
  • watcher - Watch Kubernetes resources

Configuration node cluster-config is required to be added to the flow to each node. It allows configuring the Kubernetes cluster to interact either by providing a apiServer URL, username and password or by using the inCluster option to use the service account token of the pod Kube-RED is running in.

Usage

By default, NodeRED manipulates objects in msg.payload property. Kube-RED nodes are using msg.object property to store the Kubernetes object. This way you can integrate with other nodes in the flow.

Upsert

Upsert node allows to create or update of Kubernetes resource. It uses the create and update verbs under the hood.

Object to be created or updated is stored in msg.object property and is injected using inject node.

See docs/examples/upsert.json for an example flow. Upsert example

Get/List/Delete

Get/List/Delete node allows primitive operations on Kubernetes resources. You can get resources using 2 ways:

  1. By providing a version, kind name and namespace in inject node msg.object payload
  2. By configuring the node with version, kind name and namespace inside the node itself.

Using 1 you can dynamically get a resource based on the msg.object payload, whereas using 2 you can statically configure the node to get a resource when input is triggered.

See docs/examples/get.json for an example flow. Get example

Update

Update node allows updating Kubernetes resources. It uses the patch verb under the hood. So when you have a complex update scenario, you can provide a partial object in msg.object payload as long as it has apiVersion, kind, metadata.name and metadata.namespace will patch the resource.

See docs/examples/update.json for an example flow. Update example

Watcher

Watcher node allows watching Kubernetes resources. It uses the watch verb under the hood. It works by configuring the node with version, kind name and namespace inside the node itself. When the resource is updated, the node will emit a message with the updated object in msg.object property.

Note: Values in watcher should be lowercase and plural to match Kubernetes API. For example, Deployment should be deployments.

See docs/examples/watcher.json for an example flow. Watcher example