Skip to content
Deploy Britive Bridge on Azure Red Hat OpenShift

Deploy Britive Bridge on Azure Red Hat OpenShift

Overview

Run Britive Bridge as a cluster on an ARO cluster: two orchestrators (each hosting the co-located ), proxy pods and a warm pool of session pods, a PostgreSQL datastore and a shared recordings volume. Everything comes from the published Helm chart and britive/bridge image. Four pieces are specific to OpenShift: a storage class, a security context constraint grant, a Route and an internal load balancer.

What you’ll accomplish:

  • Prepare the namespace, recordings storage and OpenShift security context
  • Store the Bridge secrets and the token
  • Install Bridge with Helm and expose it on the private network
  • Confirm both brokers connect to the pool and Bridge serves sign-in

This page is the ARO profile of the generic Kubernetes deployment. The generic guide documents every chart value; this page fixes the choices for ARO and explains the options.

How It Works

    flowchart LR
  U[Users<br/>browser, SSH, RDP] -->|443 Route<br/>2222 / 3389 internal LB| P[Proxy pods]
  P --> S[Session pods<br/>warm pool]
  S -->|record| R[(Recordings<br/>Azure Files RWX)]
  O[Orchestrators x2<br/>co-located broker] -->|spawn and retire| P
  O --> S
  O --> D[(PostgreSQL)]
  O -->|443 outbound| B[Britive tenant<br/>broker pool]
  
ComponentCountCreated byPurpose
Orchestrator with co-located broker2HelmLeader election and reconciler; the broker takes checkouts and check-ins for the pool
Proxy pods2OrchestratorFront door for web and native sessions; recording playback
Session pods2 warm, up to 64OrchestratorOne recorded session each
Export worker1HelmVideo export of recordings
PostgreSQL1HelmBridge state and broker transaction store
Recordings volume50 GiHelmAzure Files share mounted by sessions, proxies and orchestrators

Bridge pods run as the image’s built-in users: bridge (102:103), the session renderer (104) and PostgreSQL (70). OpenShift’s default restricted-v2 constraint assigns a random UID instead, so the Bridge ServiceAccounts get the built-in nonroot-v2 constraint: any non-root UID, all capabilities dropped, no privilege escalation, RuntimeDefault seccomp.

Before You Begin

  • ARO on OpenShift 4.20 or later (the chart requires Kubernetes 1.33 or later), at least three worker nodes, cluster-admin
  • Storage classes managed-csi (Azure Disk, the ARO default) and the Azure Files CSI driver (file.csi.azure.com), both standard on ARO
  • oc, Helm 3.16 or later and openssl on a host that reaches the cluster API (for a private cluster, a jump host or runner inside its network)
  • Tenant subdomain: mycompany for https://mycompany.britive-app.com
  • Broker pool token: System Administration → Brokers and Broker Pools → open the pool → Broker Pool Token → Copy Token

Outbound access from the cluster:

FromToPortPurpose
Orchestrators (broker)<tenant>.britive-app.com443Broker registration and API
Orchestrators (broker)MQTT endpoint received at bootstrap (a *.britive-app.com host)443Command channel from the pool
Orchestrators (broker)Amazon S3 (pre-signed URLs)443Scripts in, scan results out
Bridge pods, at startDocker Hub (registry-1.docker.io, auth.docker.io and its CDN)443Bridge and PostgreSQL images
Worker nodesAzure Files storage account445Recordings share
UsersRoute host, internal load balancer443, 2222, 3389Web console, native SSH and RDP
Users (browser)<tenant>.britive-app.com443Sign-in to Bridge

Deploy

Log in to the cluster

oc login https://api.<cluster domain>:6443 -u <admin user>

Create the namespace

oc create namespace britive-bridge

Create the recordings storage class

Session, proxy and orchestrator pods run on different nodes and share the recordings volume, so it must be ReadWriteMany. Azure Files takes file ownership from mount options, which make every file owned by the Bridge user.

storageclass-azurefile.yaml
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
  name: bridge-azurefile
provisioner: file.csi.azure.com
parameters:
  skuName: Standard_LRS
reclaimPolicy: Delete
volumeBindingMode: Immediate
allowVolumeExpansion: true
mountOptions:
  - uid=102
  - gid=103
  - dir_mode=0770
  - file_mode=0770
  - mfsymlinks
  - cache=strict
  - nosharesock
  - actimeo=30
oc apply -f storageclass-azurefile.yaml

Grant the security context constraint

The chart names its ServiceAccounts after the release. With release name bridge: bridge-orchestrator (orchestrators), bridge-worker (proxy and session pods) and default (export worker and PostgreSQL).

scc-rbac.yaml
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
  name: bridge-scc-nonroot-v2
  namespace: britive-bridge
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: ClusterRole
  name: system:openshift:scc:nonroot-v2
subjects:
  - { kind: ServiceAccount, name: bridge-orchestrator, namespace: britive-bridge }
  - { kind: ServiceAccount, name: bridge-worker, namespace: britive-bridge }
  - { kind: ServiceAccount, name: default, namespace: britive-bridge }
oc apply -f scc-rbac.yaml

Create the Bridge Secret

Paste the broker pool token at the prompt; the input is hidden.

read -rs POOL_TOKEN

oc -n britive-bridge create secret generic bridge-secrets \
  --from-literal=BRIDGE_CLUSTER_TOKEN="$(openssl rand -hex 32)" \
  --from-literal=BRIDGE_ENCRYPTION_KEY_B64="$(openssl rand -base64 32)" \
  --from-literal=BRIDGE_HOST_KEY_SEED="$(openssl rand -hex 32)" \
  --from-literal=BRIDGE_DATASTORE_HOST=bridge-postgres \
  --from-literal=BRIDGE_DATASTORE_PORT=5432 \
  --from-literal=BRIDGE_DATASTORE_USER=bridge \
  --from-literal=BRIDGE_DATASTORE_PASSWORD="$(openssl rand -hex 24)" \
  --from-literal=BRIDGE_DATASTORE_NAME=bridge \
  --from-literal=BRIDGE_DATASTORE_SSLMODE=disable \
  --from-literal=BRITIVE_BROKER_AUTH_TOKEN="$POOL_TOKEN"
unset POOL_TOKEN

BRIDGE_ENCRYPTION_KEY_B64 encrypts data in the Bridge database and must stay the same for the life of the deployment. Keep a copy of the Secret in your vault: oc -n britive-bridge get secret bridge-secrets -o yaml.

Write the values file

Replace <tenant> with your tenant subdomain.

values-aro.yaml
image:
  repository: britive/bridge
  tag: v3.0.2
  pullPolicy: IfNotPresent

secrets:
  existingSecret: bridge-secrets

orchestrator:
  replicas: 2
  resources:
    requests: { cpu: 250m, memory: 512Mi }
    limits: { cpu: "1", memory: 1Gi }
  extensions:
    env:
      # Tenant the co-located broker registers with; the chart does not set it.
      - { name: BRITIVE_BROKER_TENANT_SUBDOMAIN, value: <tenant> }

worker:
  resources:
    requests: { cpu: 100m, memory: 256Mi }
    limits: { cpu: "1", memory: 1Gi }

config:
  auth:
    types: [britive]
    britive:
      tenant: https://<tenant>.britive-app.com
  cluster:
    orchestrator:
      proxyWorkers: 2
      warmSessionWorkers: 2
  protocols:
    ssh: { native: true, browser: true }
    rdp: { native: true, browser: true }

# Bundled PostgreSQL. Its password is passed at install time (next step).
datastore:
  user: bridge
  name: bridge
postgres:
  enabled: true
  storageClassName: managed-csi
  storage: 10Gi

recordings:
  mode: pvc
  pvc:
    storageClassName: bridge-azurefile
    accessMode: ReadWriteMany
    size: 50Gi

proxyService:
  type: ClusterIP
  ports:
    web: 8080
    ssh: 2222
  extraPorts:
    - { name: rdp, port: 3389, targetPort: 3389 }

Install the chart

The bundled PostgreSQL reads its password from the chart value datastore.password, while Bridge reads BRIDGE_DATASTORE_PASSWORD from the Secret. The command passes the Secret’s value so both match.

helm upgrade --install bridge oci://registry-1.docker.io/britive/bridge-chart --version 3.0.2 \
  -n britive-bridge -f values-aro.yaml \
  --set-string datastore.password="$(oc -n britive-bridge get secret bridge-secrets \
      -o jsonpath='{.data.BRIDGE_DATASTORE_PASSWORD}' | base64 -d)" \
  --wait --timeout 12m

The release name must be bridge to match the constraint grant. The orchestrators start two proxy pods and two session pods once they are up.

Expose the web console with a Route

The router terminates TLS and forwards to the proxy Service on 8080. On a private ARO cluster the default ingress is internal, so the Route is reachable only from the cluster’s network. Set host, or remove it to get bridge-britive-bridge.<apps domain>.

route.yaml
apiVersion: route.openshift.io/v1
kind: Route
metadata:
  name: bridge
  namespace: britive-bridge
spec:
  host: bridge.<apps domain>
  to:
    kind: Service
    name: bridge-proxy
  port:
    targetPort: web
  tls:
    termination: edge
    insecureEdgeTerminationPolicy: Redirect
oc apply -f route.yaml

Expose native SSH and RDP on an internal load balancer

native-lb.yaml
apiVersion: v1
kind: Service
metadata:
  name: bridge-native
  namespace: britive-bridge
  annotations:
    service.beta.kubernetes.io/azure-load-balancer-internal: "true"
spec:
  type: LoadBalancer
  externalTrafficPolicy: Local
  selector:
    app.kubernetes.io/instance: bridge
    bridge.role: proxy
  ports:
    - { name: ssh, port: 2222, targetPort: 2222, protocol: TCP }
    - { name: rdp, port: 3389, targetPort: 3389, protocol: TCP }
oc apply -f native-lb.yaml
oc -n britive-bridge get svc bridge-native -o jsonpath='{.status.loadBalancer.ingress[0].ip}{"\n"}'

Create private DNS records for the Route host and, optionally, the load balancer address.

Verify

Check the pods and the constraint each one runs under:

oc -n britive-bridge get pods -o custom-columns='POD:.metadata.name,ROLE:.metadata.labels.bridge\.role,SCC:.metadata.annotations.openshift\.io/scc,READY:.status.containerStatuses[*].ready'

Expect two bridge-orchestrator, one bridge-export, one bridge-postgres, two bridge-proxy and two bridge-session pods (two containers each), all nonroot-v2 and ready. Volume or readiness warnings during the first minute are expected while Azure Files creates the share.

Check that both brokers connected:

oc -n britive-bridge logs deploy/bridge-orchestrator -c bridge | grep -E 'Britive broker starting|Connection success'

Each orchestrator logs Britive broker starting and Connection success, and the broker pool shows two connected brokers in the Britive console.

Check recordings and web access:

oc -n britive-bridge exec deploy/bridge-orchestrator -c bridge -- ls -ld /data/recordings
curl -sk -o /dev/null -w '%{http_code}\n' "https://$(oc -n britive-bridge get route bridge -o jsonpath='{.spec.host}')/"

Expect drwxrwx--- bridge bridge and 302 (the sign-in redirect). Open the Route URL from the private network and sign in with Britive.

Deployment Options

Every choice above has alternatives. Each is a chart value or a Kubernetes object alongside the chart.

AreaUsed aboveOptions
Orchestratorsorchestrator.replicas: 2 (HA; each runs a broker)1 for a smaller footprint, with a short reconcile gap on failover. Two or more need ReadWriteMany recordings storage
Session capacity2 warm session pods, up to 64config.cluster.orchestrator.warmSessionWorkers, maxSessionWorkers, config.cluster.session.maxConcurrentSessions; worker cycling with config.cluster.session.lifespan and config.cluster.proxy.lifespan
Co-located brokerOn (BRITIVE_BROKER_AUTH_TOKEN in the Secret, tenant in orchestrator.extensions.env)Leave the token out to run Bridge without a broker, and install a license from the Admin console instead
Broker toolsImage as published, with no extra toolsStage the tools your scripts call with orchestrator.extensions.initContainers, volumes, volumeMounts and env (example below); mount Secrets the same way, for example kubeconfigs for clusters the broker manages
DatastoreBundled PostgreSQL on managed-csi (evaluation)Azure Database for PostgreSQL: postgres.enabled: false, datastore.host, credentials in the Secret, sslmode verify-full (the default for an external database) and datastore.sslrootcert for a private CA.
RecordingsAzure Files, ReadWriteMany, mount options for 102:103Any ReadWriteMany class writable by 102:103 (for example NFS); an existing claim with recordings.pvc.existingClaim. recordings.mode: hostPath is single-node evaluation only and needs a root init container, which nonroot-v2 does not allow
Web accessEdge Route on the private ingressA Route on a dedicated or public ingress controller. If sign-in redirects to http://, set config.auth.britive.redirectUrl to the Route URL. List upstream proxy addresses in config.trustedProxies only when they set forwarded headers
Native accessInternal Azure load balancer for 2222 and 3389Leave out for browser-only use. A public load balancer, or proxyService.type: LoadBalancer, also exposes the plaintext web port and needs proxyService.acknowledgePlaintextWeb: true; keep the Service private and put TLS in front of the web port
ProtocolsSSH and RDP, native and browserconfig.protocols for ssh, rdp, telnet, k8sExec, oracle (beta); add native ports under proxyService.extraPorts; other settings through config.extraConfig
ImagesDocker Hub britive/bridge:v3.0.2, postgres:17-alpineMirror to Azure Container Registry: image.repository, postgres.image, imagePullSecrets (also applied to the pods the orchestrator spawns)
Secretsbridge-secrets created with ocCreate the same Secret from Azure Key Vault with the Secrets Store CSI driver or External Secrets; keep the key names. Or let the chart create it from secrets.* values
Placement and sizingDefault schedulingorchestrator.nodeSelector, tolerations, affinity; worker.* for spawned pods, with per-role overrides in worker.customization.session and .proxy
VersionChart 3.0.2, image v3.0.2Pin both on every upgrade. Database migrations are one-way: back up PostgreSQL first

Example: add a tool for broker scripts

The published britive/bridge image is a minimal Alpine image. It does not ship bash, jq, kubectl or other tools that broker scripts commonly call, and packages installed inside an init container do not reach the Bridge container. Stage every tool your scripts use. The exception is bsh, which Bridge includes from v3.0.1.

Broker scripts run in the orchestrator’s bridge container, so tools must be copied onto a shared volume. The image is Alpine (musl), so binaries must be statically linked or musl builds.

ToolIn the imageHow to add it
bshYes, from v3.0.1Nothing to stage. For an older image or an external broker, see Install bsh
jqNoDownload the static binary, as in the example below
kubectl, ocNoDownload the static kubectl and link it as oc, as in the example below
bashNoNot a static binary: it needs its libraries. Copy a tool bundle that includes them, as in Add optional broker tools, or write the script for sh

This example adds a checksum-pinned jq and kubectl, and exposes kubectl as oc:

values-aro.yaml (excerpt)
orchestrator:
  extensions:
    initContainers:
      - name: install-tools
        image: britive/bridge:v3.0.2
        command: ["/bin/sh", "-ec"]
        args:
          - |
            mkdir -p /tools/bin
            curl -fsSL --retry 5 -o /tools/bin/kubectl "${KUBECTL_URL}"
            echo "${KUBECTL_SHA256}  /tools/bin/kubectl" | sha256sum -c -
            curl -fsSL --retry 5 -o /tools/bin/jq "${JQ_URL}"
            echo "${JQ_SHA256}  /tools/bin/jq" | sha256sum -c -
            chmod 0755 /tools/bin/kubectl /tools/bin/jq
            ln -sf kubectl /tools/bin/oc
        env:
          - { name: KUBECTL_URL, value: "https://dl.k8s.io/release/v1.34.13/bin/linux/amd64/kubectl" }
          - { name: KUBECTL_SHA256, value: "b4bb494e9466a7a94bb851414548bc0d3e2f8da90757e6eccc3371e648648591" }
          - { name: JQ_URL, value: "https://github.com/jqlang/jq/releases/download/jq-1.7.1/jq-linux-amd64" }
          - { name: JQ_SHA256, value: "5942c9b0934e510ee61eb3e30273f1b3fe2590df93933a93d7c58b81d19c8ff5" }
        securityContext:
          allowPrivilegeEscalation: false
          capabilities: { drop: ["ALL"] }
        volumeMounts:
          - { name: broker-tools, mountPath: /tools }
    volumes:
      - { name: broker-tools, emptyDir: {} }
    volumeMounts:
      - { name: broker-tools, mountPath: /opt/broker-tools, readOnly: true }
    env:
      - { name: PATH, value: "/opt/broker-tools/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" }
      - { name: BRITIVE_BROKER_TENANT_SUBDOMAIN, value: <tenant> }

Allow outbound 443 to dl.k8s.io and github.com (GitHub redirects release downloads to a githubusercontent.com host), or point the URLs at internal copies of the same files and keep the checksums. Match the architecture to your nodes: these URLs are amd64.

Operations

TaskHow
Rotate the pool tokenAdd and activate a new token on the pool, oc -n britive-bridge set data secret/bridge-secrets BRITIVE_BROKER_AUTH_TOKEN=<new token>, then oc -n britive-bridge rollout restart deploy/bridge-orchestrator
Back up the databaseoc -n britive-bridge exec deploy/bridge-postgres -- pg_dump -U bridge bridge > bridge-$(date +%F).sql
UpgradeBack up the database, change the chart --version and image.tag, rerun the install command
Uninstallhelm -n britive-bridge uninstall bridge, then oc -n britive-bridge delete route/bridge svc/bridge-native. The recordings share and database volume are deleted with the release

Troubleshoot

SymptomCauseFix
Pods not created: unable to validate against any security context constraintnonroot-v2 not granted, or a different release name or namespaceApply scc-rbac.yaml; install as release bridge in britive-bridge
Pods Pending on volume claims after the first minutesThe recordings storage class is missing or cannot create Azure Files sharesoc get sc bridge-azurefile; check oc -n britive-bridge get pvc events
No brokers connect to the poolToken missing or not active, wrong tenant subdomain, or no outbound 443oc -n britive-bridge logs deploy/bridge-orchestrator -c bridge | grep -i broker; fix the Secret or BRITIVE_BROKER_TENANT_SUBDOMAIN, then restart the orchestrators
Image pull errorsNo route to Docker HubAllow Docker Hub, or mirror the images and set image.repository and postgres.image
Sign-in returns to an http:// URLThe router did not pass the original schemeSet config.auth.britive.redirectUrl to the Route URL and rerun the install command

Next Steps

Last updated on