Kubernetes Deployment
BlazeBee is designed to run reliably inside Kubernetes clusters with minimal operational overhead. Its stateless runtime model, externalized configuration, and MQTT-based transport make it suitable for both centralized and node-level metric collection in cloud-native environments.
This page describes recommended Kubernetes deployment patterns, configuration strategies, and operational considerations.
Purpose
Section titled “Purpose”This guide explains:
- How to deploy BlazeBee in Kubernetes
- How configuration is managed using ConfigMaps and Secrets
- When to use Deployment vs DaemonSet
- How BlazeBee integrates with MQTT services inside a cluster
Prerequisites
Section titled “Prerequisites”Required
Section titled “Required”- A running Kubernetes cluster
- Local: Minikube, Kind
- Managed: EKS, GKE, AKS, etc.
kubectlconfigured for the target cluster- BlazeBee container image available in a registry accessible by the cluster
Optional
Section titled “Optional”- MQTT broker deployed inside the cluster
- Persistent storage for the broker
- Kubernetes Secrets for credentials
Image Selection
Section titled “Image Selection”Choose an image variant appropriate for your use case:
rubtsovs/blazebee:standard-amd64— recommended defaultrubtsovs/blazebee:large-amd64— advanced collectors- Architecture-specific tags for non-amd64 nodes
The image must include all collectors required by the configuration.
Basic Deployment Model
Section titled “Basic Deployment Model”The simplest deployment uses a single replica BlazeBee instance publishing cluster-level or host-level metrics.
Deployment Manifest
Section titled “Deployment Manifest”Create blazebee-deployment.yaml:
apiVersion: apps/v1kind: Deploymentmetadata: name: blazebee labels: app: blazebeespec: replicas: 1 selector: matchLabels: app: blazebee template: metadata: labels: app: blazebee spec: containers: - name: blazebee image: rubtsovs/blazebee:latest-amd64 imagePullPolicy: IfNotPresent volumeMounts: - name: config mountPath: /etc/blazebee/config.toml subPath: config.toml volumes: - name: config configMap: name: blazebee-configThis deployment:
- Runs a single BlazeBee instance
- Loads configuration from a ConfigMap
- Does not require persistent storage
Configuration via ConfigMap
Section titled “Configuration via ConfigMap”ConfigMap Definition
Section titled “ConfigMap Definition”apiVersion: v1kind: ConfigMapmetadata: name: blazebee-configdata: config.toml: | [transport] host = "mqtt-service" port = 1883
[[metrics.collectors.enabled]] name = "cpu" [metrics.collectors.enabled.metadata] topic = "metrics/cpu" qos = 0 retain = true
[[metrics.collectors.enabled]] name = "ram" [metrics.collectors.enabled.metadata] topic = "metrics/ram" qos = 0 retain = true
[[metrics.collectors.enabled]] name = "disk" [metrics.collectors.enabled.metadata] topic = "metrics/disk" qos = 0 retain = true
[[metrics.collectors.enabled]] name = "network" [metrics.collectors.enabled.metadata] topic = "metrics/network" qos = 0 retain = trueConfiguration Notes
Section titled “Configuration Notes”- Configuration is immutable at runtime
- Changes require pod restart
- Topic naming should reflect cluster and node identity if multiple instances are used
Applying the Deployment
Section titled “Applying the Deployment”kubectl apply -f blazebee-deployment.yamlVerify:
kubectl get podskubectl logs deployment/blazebeeDaemonSet Deployment (Node-Level Metrics)
Section titled “DaemonSet Deployment (Node-Level Metrics)”For per-node system metrics, BlazeBee should be deployed as a DaemonSet.
When to Use DaemonSet
Section titled “When to Use DaemonSet”- Collect metrics from every node
- Monitor hardware, kernel, or filesystem state
- Avoid metric aggregation gaps during node scaling
DaemonSet Example
Section titled “DaemonSet Example”apiVersion: apps/v1kind: DaemonSetmetadata: name: blazebeespec: selector: matchLabels: app: blazebee template: metadata: labels: app: blazebee spec: containers: - name: blazebee image: rubtsovs/blazebee:standard-amd64 volumeMounts: - name: config mountPath: /etc/blazebee/config.toml subPath: config.toml volumes: - name: config configMap: name: blazebee-configEach node runs exactly one BlazeBee instance.
Secrets Management
Section titled “Secrets Management”MQTT credentials should not be stored in ConfigMaps.
Secret Definition
Section titled “Secret Definition”apiVersion: v1kind: Secretmetadata: name: blazebee-secretstype: Opaquedata: mqtt-username: <base64> mqtt-password: <base64>Injecting Secrets
Section titled “Injecting Secrets”env: - name: MQTT_USERNAME valueFrom: secretKeyRef: name: blazebee-secrets key: mqtt-username - name: MQTT_PASSWORD valueFrom: secretKeyRef: name: blazebee-secrets key: mqtt-passwordThese variables can be referenced inside config.toml.
Resource Management
Section titled “Resource Management”BlazeBee has a low runtime footprint.
Recommended defaults:
resources: requests: cpu: "50m" memory: "64Mi" limits: cpu: "200m" memory: "256Mi"Adjust based on:
- Number of enabled collectors
- Collection frequency
- Cluster size
MQTT Integration
Section titled “MQTT Integration”Broker Deployment
Section titled “Broker Deployment”MQTT broker should be deployed as:
- Kubernetes Service
- StatefulSet or Deployment
Example service hostname:
[transport]host = "mqtt-service"port = 1883Networking
Section titled “Networking”- BlazeBee communicates with the broker over the cluster network
- No ports need to be exposed externally
- TLS is recommended for multi-tenant clusters
Logging and Observability
Section titled “Logging and Observability”- Logs are written to STDOUT
- Accessible via
kubectl logs - Designed for integration with cluster-wide log aggregation
Example:
kubectl logs -l app=blazebeeRolling Updates
Section titled “Rolling Updates”- Configuration changes require pod restart
- Deployment updates trigger rolling replacement
- DaemonSet updates roll node by node
Operational Considerations
Section titled “Operational Considerations”-
Advanced collectors may require:
- Host access (
/proc,/sys) - Privileged pods
- Host access (
-
Linux-only support
-
Clock synchronization recommended for accurate timestamps
Summary
Section titled “Summary”BlazeBee integrates cleanly into Kubernetes using standard primitives. Deployment and DaemonSet modes cover both centralized and node-level monitoring scenarios. Externalized configuration, MQTT-based transport, and low resource usage make BlazeBee suitable for production-grade cloud-native environments.