Options
All
  • Public
  • Public/Protected
  • All
Menu

@datapio/sdk-k8s-operator

Datapio SDK Kubernetes Operator

The Datapio SDK Kubernetes Operator provides a declarative way to interact with a Kubernetes Cluster and watch resources.

It allows you to:

  • watch Kubernetes resources
  • expose a HealthCheck for Kubernetes Readiness/Liveness Probes on /health
  • expose a Metrics endpoint for Prometheus on /metrics (soon)
  • expose a GraphQL API on /graphql
  • expose a custom HTTP API on /api
  • endpoint listenning on HTTP(S)

Installation

$ npm install @datapio/sdk-k8s-operator

Usage

The SDK provides an Operator class that you can inherit from:

import { Operator } from '@datapio/sdk-k8s-operator'

class MyOperator extends Operator {
  constructor() {
    super({
      /* options */
    })
  }
}

You can then instantiate and use your operator:

const operator = new MyOperator()

// start the operator
await operator.service.listen()

Generated using TypeDoc