Operations

Kubernetes Deployment


Orcher includes production-ready Kubernetes manifests in services/orchestrator/k8s/ that deploy the orchestrator as a scalable Deployment with health checks, autoscaling, pod disruption budgets, and Prometheus integration. Manifests are managed with Kustomize for easy customization.

  • Kustomize-based — Single kubectl apply -k . deploys all resources with consistent labels and namespace
  • Autoscaling — HorizontalPodAutoscaler scales from 3 to 10 replicas based on CPU and memory utilization
  • High availability — Pod anti-affinity spreads replicas across nodes, PodDisruptionBudget ensures minimum 2 pods
  • Security — Non-root container, RBAC with minimal permissions, secrets for database credentials
  • Monitoring — Prometheus scrape annotations on pods, health check endpoints for liveness and readiness

Prerequisites

  • Kubernetes cluster v1.24+
  • kubectl configured to access your cluster
  • Container image built from the Dockerfile and pushed to a registry

Quick Start

1. Create Namespace and Secrets

1
kubectl create namespace orcher
2
3
kubectl create secret generic orcher-secrets \
4
--namespace=orcher \
5
--from-literal=database-url='postgresql://orcher:orcher@postgres:5432/orcher' \
6
--from-literal=redis-url='redis://redis:6379'

2. Deploy with Kustomize

1
cd services/orchestrator/k8s
2
kubectl apply -k .

This creates all resources in the orcher namespace: Deployment, Services, ConfigMap, RBAC, HPA, and PDB.

3. Verify

1
kubectl get pods -n orcher -l app=orchestrator
2
kubectl get svc -n orcher -l app=orchestrator
3
kubectl get hpa -n orcher

Next Steps

  • Manifests — Deployment, Service, ConfigMap, and RBAC manifests
  • Autoscaling — HPA, PDB, and Kustomize configuration
  • Production — Monitoring, scaling, security, and troubleshooting
  • Docker — Docker Compose setup for backing services
  • Configuration — Full configuration reference