Skip to main content

Deploy Expanso on Single-Node OpenShift

Deploy the Expanso Edge agent as a DaemonSet on your SNO cluster to enable log collection and monitoring.

DaemonSet Deployment

apiVersion: apps/v1
kind: DaemonSet
metadata:
name: expanso-edge
namespace: expanso-system
spec:
selector:
matchLabels:
app: expanso-edge
template:
metadata:
labels:
app: expanso-edge
spec:
serviceAccountName: expanso-edge
hostNetwork: true
containers:
- name: expanso-edge
image: ghcr.io/expanso-io/expanso-edge:nightly
env:
- name: NODE_NAME
valueFrom:
fieldRef:
fieldPath: spec.nodeName
- name: CLUSTER_NAME
value: "sno-retail-001"
- name: LOCATION
value: "store-chicago-north"
volumeMounts:
- name: config
mountPath: /etc/expanso/pipeline.yaml
subPath: pipeline.yaml
- name: kubeconfig
mountPath: /root/.kube/config
subPath: config
volumes:
- name: config
configMap:
name: expanso-pipeline
- name: kubeconfig
secret:
secretName: expanso-kubeconfig

Configuration

Namespace: Create the expanso-system namespace first:

oc create namespace expanso-system

Environment variables:

  • NODE_NAME: Automatically populated from pod spec
  • CLUSTER_NAME: Unique identifier for this SNO cluster
  • LOCATION: Physical location (store, factory, etc.)

ConfigMap: Store your pipeline configuration:

oc create configmap expanso-pipeline \
--from-file=pipeline.yaml \
-n expanso-system

ServiceAccount: Required for RBAC permissions (see RBAC Setup)

Host Network Mode

hostNetwork: true

Why: Allows Expanso to access oc commands and cluster resources directly from the node without network isolation.

Security consideration: Only use when Expanso needs direct node access for log collection.

Apply Deployment

# Create namespace
oc create namespace expanso-system

# Create service account (see RBAC Setup)
oc apply -f expanso-rbac.yaml

# Create pipeline config
oc create configmap expanso-pipeline \
--from-file=pipeline.yaml \
-n expanso-system

# Deploy DaemonSet
oc apply -f expanso-daemonset.yaml

# Verify deployment
oc get pods -n expanso-system
oc logs -n expanso-system -l app=expanso-edge --follow

Resource Limits

For SNO environments, set conservative resource limits:

resources:
requests:
cpu: 100m
memory: 128Mi
limits:
cpu: 500m
memory: 512Mi

Next Steps