Operate an Operator Deployment
This guide covers the day-two tasks for a SemanticRouter resource. For
installation and a first deployment, see
Deploy with the Kubernetes Operator.
Read reconciliation status
kubectl get semanticrouter <name> -o wide
kubectl describe semanticrouter <name>
kubectl get semanticrouter <name> -o jsonpath='{.status.conditions}'
Use metadata.generation, status.observedGeneration, status conditions, and
ready replicas together. A running controller does not mean the latest custom
resource generation has been applied successfully.
Inspect the owned workload when reconciliation stalls:
kubectl get deployment,pod,service,configmap,pvc \
-l app.kubernetes.io/instance=<name>
kubectl logs -n semantic-router-operator-system \
deployment/semantic-router-operator-controller-manager
Update safely
- Export the current custom resource and record the deployed image reference.
- Review CRD and release notes for schema changes.
- Apply the new custom resource or Operator version in a non-production environment.
- Wait for the observed generation and ready replicas to converge.
- Send real requests through every important entrypoint.
- Roll back the custom resource or image reference if readiness or routing regresses.
Pin image tags or digests. Avoid changing the Operator, Router image, routing policy, model pool, and storage backend in one rollout unless those changes are intentionally coupled and tested together.
Scale and availability
Set fixed replicas through spec.replicas, or enable the HPA adapter:
spec:
autoscaling:
enabled: true
minReplicas: 2
maxReplicas: 10
targetCPUUtilizationPercentage: 70
Use node affinity, tolerations, topology spread or anti-affinity, and a separately managed PodDisruptionBudget to match your availability target. Learning or other replica-local mutable state may require additional design; do not assume that adding replicas makes every stateful routing feature consistent.
Metrics and tracing
The Router exposes Prometheus metrics on the configured metrics Service port (9190 by default):
kubectl port-forward service/<name> 9190:9190
curl -sS http://localhost:9190/metrics | head
Configure a ServiceMonitor or equivalent scraper with the labels used by your
deployment. Enable OpenTelemetry through spec.config.observability and send
traces to a collector reachable from the Router namespace. Keep trace sampling
and captured attributes appropriate for the sensitivity of request data.