KubeCon EUBooth 1151, Amsterdam. March 23-26
Workload Operator

Overview

The dakr-operator (aka "workload operator" or "write operator") receives optimization recommendations and applies them to your Kubernetes workloads.

Write Operator (dakr-op)

The Write Operator receives optimization recommendations from the DevZero platform and applies them to your cluster. It operates within policy boundaries you define -- nothing is changed without your rules allowing it.

What It Does

  1. Connects to the DevZero platform via a persistent gRPC stream
  2. Receives recommendations for workload and node group optimization
    1. Receives CRD updates used by all other DevZero operators (including itself)
  3. Validates each recommendation against your configured policies
  4. Applies approved changes as Kubernetes-native operations

Types of Changes

ActionWhat HappensKubernetes Operation
RightsizingAdjusts CPU/memory requests and limitsPatch Deployment/StatefulSet spec
Replica scalingAdjusts replica count based on traffic patternsPatch Deployment replicas or HPA
Live migrationResizes workloads without restartCRIU checkpoint/restore
Node consolidationMarks underutilized nodes for drainingCordon + drain via Node Operator

CRDs

The Write Operator creates and manages two Custom Resource Definitions:

WorkloadRecommendation

Represents a pending or applied recommendation for a workload:

apiVersion: dakr.devzero.io/v1alpha1
kind: WorkloadRecommendation
metadata:
  name: my-deployment-rec
  namespace: production
spec:
  targetRef:
    kind: Deployment
    name: my-deployment
  containers:
    - name: app
      resources:
        requests:
          cpu: "250m"      # current: 1000m
          memory: "256Mi"  # current: 1Gi
        limits:
          cpu: "500m"
          memory: "512Mi"
status:
  phase: Pending  # Pending | Approved | Applied | Rejected
  projectedSavings: "$42.30/month"

NodeGroupRecommendation

Represents a recommendation for node pool optimization:

apiVersion: dakr.devzero.io/v1alpha1
kind: NodeGroupRecommendation
metadata:
  name: ng-rec-001
spec:
  nodeGroup: default-pool
  action: consolidate
  targetNodeCount: 3  # current: 5
status:
  phase: Pending

How Policies Control It

The Write Operator only applies changes that match active policies. If no policy covers a workload, the recommendation is surfaced in the dashboard but not applied.

See Policies & Rules for details on configuring policies.

Installation

The Write Operator is installed alongside the Read Operator during cluster setup. It can also be installed separately:

helm upgrade --install dakr-operator \
  oci://registry-1.docker.io/devzeroinc/dakr-operator \
  --namespace dakr-operator \
  --create-namespace \
  --set clusterID=<your-cluster-id> \
  --set apiEndpoint=api.devzero.io:443

Security

  • The Write Operator's RBAC is scoped to only the resource types it needs to modify (Deployments, StatefulSets, DaemonSets, HPAs)
  • All changes are logged and auditable via the DevZero dashboard
  • Changes can be rolled back from the dashboard or by deleting the WorkloadRecommendation CRD

On this page