High Availability

Deploy BindPlane OP Server to Kubernetes with High Availability

important

🚧 This feature is only available in BindPlane OP Enterprise. Learn more here.

Architecture

When BindPlane is deployed as a Deployment, it has the following architecture.

  • Deployment
    • Multiple replicas
    • Horizontal Pod Autoscaler (optional).
  • PostgreSQL storage backend.
  • Prometheus time series database
    • Prometheus stores agent throughput measurements.
  • One or more Transform agent pods, for live preview.

Prerequisites

Licensing

An Enterprise license is required when operating BindPlane with multiple instances.

PostgreSQL

PostgreSQL must be deployed and reachable from the cluster.

Postgres requirements

  • Database named bindplane
  • User with full permission to the bindplane database
  • Reachable from BindPlane's Kubernetes cluster

Prometheus

Prometheus must be deployed and reachable from the cluster.

Prometheus requirements

  • Must be dedicated to the BindPlane OP cluster
  • Must have the BindPlane measurements recording rule
  • Reachable from BindPlane's Kubernetes cluster with remote write

Recording Rules

Regardless of your Prometheus installation method, you must configure the following Recording Rule.

yaml
1groups:
2  - name: configuration-rollups
3    interval: 1m
4    rules:
5      - record: bindplane_agent_measurements:rollup:rate:1m
6        expr: sum without (agent) (rate(bindplane_agent_measurements{}[1m9s999ms] offset 10s))

Event Bus

BindPlane requires an external event bus when operating with more than one pod. See the Event Bus documentation for details.

Installation

Add the BindPlane OP Helm chart to your workstation.

bash
1helm repo add "bindplane" \
2    "https://observiq.github.io/bindplane-op-helm"
3
4helm repo update

Create a values.yaml file, which will be used to configure your Helm deployment.

  • license: Your Enterprise license. Add the initial options. Make sure to set the following:
  • config.username: Your basic auth username for the Administrator account.
  • config.password: Your basic auth password for the Administrator account.
  • config.secret_key: A random uuid. You can use uuidgen to create one.
  • config.sessions_secret: A random uuid. You can use uuidgen to create one.
  • config.eventbus.type: The event bus type to use. This example will use Google Pub/Sub. See the Helm Event Bus Configuration doc for available options.
  • prometheus.host: The Hostname or IP address of the Prometheus host.
  • prometheus.port: The Prometheus server's port.
  • backend.postgres.host: The Hostname or IP address of the PostgreSQL server.
  • backend.postgres.port: The PostgreSQL server's port.
  • backend.postgres.username: The username the BindPlane server should use to connect to Postgres.
  • backend.postgres.password: The password the BindPlane server should use to connect to Postgres.
yaml
1image:
2  name: ghcr.io/observiq/bindplane-ee
3  tag: 1.39.0
4
5config:
6  # An Enterprise license is required for
7  # BindPlane when using PostgreSQL and an event bus.
8  license: ''
9
10  # These options should be configured by
11  # the user.
12  username: ''
13  password: ''
14  secret_key: ''
15  sessions_secret: ''
16
17# When autoscaling is enabled, BindPlane will be
18# deployed as a Deployment.
19autoscaling:
20  enable: true
21  min: 2
22  max: 10
23  targetCPUUtilizationPercentage: 60
24  targetMemoryUtilizationPercentage: 60
25
26# Eventbus is required when operating BindPlane
27# using a distributed architecture.
28eventbus:
29  # Available options are Google "pubsub" and "kafka".
30  type: 'pubsub'
31  pubsub:
32    projectid: ''
33    topic: ''
34
35# Prometheus is deployed outside of this chart
36# and shared by all BindPlane pods.
37prometheus:
38  enable: true
39  enableSideCar: false
40  host: ''
41  port: 9090
42
43# Postgres is deployed outside of this chart
44# shared by all BindPlane pods.
45backend:
46  type: postgres
47  postgres:
48    host: ''
49    port: 5432
50    database: 'bindplane'
51    username: ''
52    password: ''
53
54resources:
55  # Allow cpu bursting.
56  # Request fixed amount of memory, 1Gb.
57  requests:
58    cpu: '500m'
59    memory: '1024Mi'
60  limits:
61    memory: '1024Mi'
62
63transform_agent:
64  replicas: 2

Deploy BindPlane to the bindplane namespace using Helm and your previously created values.yaml configuration file.

bash
1helm repo update
2
3helm upgrade \
4    --values="values.yaml" \
5    --namespace=bindplane \
6    --create-namespace \
7    --install \
8    bindplane \
9    bindplane/bindplane

After a few moments, check the namespace by running kubectl -n bindplane get all.

You will see the following

  • Two Deployments
    • BindPlane server
    • BindPlane Transform Agent for Live Preview
  • Two clusterIP services
    • BindPlane
    • BindPlane Transform Agent
  • BindPlane server Horizontal Pod Autoscaler
text
1NAME                                            READY   STATUS    RESTARTS   AGE
2pod/bindplane-655d488598-28j9d                  1/1     Running   0          27s
3pod/bindplane-655d488598-rsm7f                  1/1     Running   0          5m53s
4pod/bindplane-transform-agent-b44d78f5b-j6bvw   1/1     Running   0          23m
5pod/bindplane-transform-agent-b44d78f5b-rkzxd   1/1     Running   0          23m
6
7NAME                                TYPE        CLUSTER-IP     EXTERNAL-IP   PORT(S)    AGE
8service/bindplane                   ClusterIP   10.12.14.118   <none>        3001/TCP   23m
9service/bindplane-transform-agent   ClusterIP   10.12.2.201    <none>        4568/TCP   23m
10
11NAME                                        READY   UP-TO-DATE   AVAILABLE   AGE
12deployment.apps/bindplane                   2/2     2            2           23m
13deployment.apps/bindplane-transform-agent   2/2     2            2           23m
14
15NAME                                                  DESIRED   CURRENT   READY   AGE
16replicaset.apps/bindplane-655d488598                  2         2         2       9m4s
17replicaset.apps/bindplane-7bfbf6bb99                  0         0         0       23m
18replicaset.apps/bindplane-transform-agent-b44d78f5b   2         2         2       23m
19
20NAME                                            REFERENCE              TARGETS          MINPODS   MAXPODS   REPLICAS   AGE
21horizontalpodautoscaler.autoscaling/bindplane   Deployment/bindplane   3%/60%, 2%/60%   2         10        2          23m