How seldonio/seldon-core works
Purpose and entry points
Seldon Core 2 is a Kubernetes-native MLOps/LLMOps platform for deploying models, composed pipelines, and traffic experiments. Primary executable entry points are the Kubernetes operator (operator/main.go), scheduler/control plane (scheduler/cmd/scheduler/main.go), model and pipeline gateways (scheduler/cmd/modelgateway/main.go, scheduler/cmd/pipelinegateway/main.go), per-server agent (scheduler/cmd/agent/main.go), and user CLI (operator/cmd/seldon/main.go).
Kubernetes control plane
The operator defines CRDs for Models, Pipelines, Servers, Experiments, and runtime/configuration resources, then reconciles desired Kubernetes resources and forwards lifecycle intent to the scheduler. Core controllers are in operator/controllers/mlops/model_controller.go, operator/controllers/mlops/pipeline_controller.go, and operator/controllers/mlops/server_controller.go; resource schemas live in operator/apis/mlops/v1alpha1/model_types.go and operator/config/crd/bases/.
Scheduling and state coordination
The Go scheduler is the central control-plane service: it receives model/pipeline/server operations, maintains state, selects viable server replicas, synchronizes server state, and reports status. Its major boundaries are API serving (scheduler/pkg/server/control_plane.go), scheduling policies (scheduler/pkg/scheduler/scheduler.go), model/pipeline/experiment stores (scheduler/pkg/store/), and server synchronization (scheduler/pkg/synchroniser/servers_sync.go). Scheduler-facing contracts are defined in apis/mlops/scheduler/scheduler.proto.
Model-serving lifecycle
A Server CR reconciles into workloads running compatible inference servers such as MLServer or Triton, plus an agent. The agent manages model artifact retrieval, repository updates, model-server control-plane calls, readiness/draining, caching, and model-use statistics for scaling/overcommit. Key implementation points: scheduler/pkg/agent/server.go, scheduler/pkg/agent/modelserver_controlplane/oip/v2.go, scheduler/pkg/agent/repository/, and scheduler/pkg/agent/modelscaling/.
Request routing and inference boundary
External inference reaches model or pipeline gateways; Envoy receives dynamically generated routing configuration. The scheduler’s Envoy processor/cache translates live model, pipeline, and experiment state into xDS snapshots (scheduler/pkg/envoy/processor/server.go, scheduler/pkg/envoy/xdscache/seldoncache.go). Model-server inference uses the Open Inference Protocol V2 contract in apis/mlops/v2_dataplane/v2_dataplane.proto; gateways and proxy interfaces are implemented under scheduler/pkg/kafka/gateway/ and scheduler/pkg/proxy/.
Pipeline data plane
Pipelines are asynchronous/realtime graphs carried through Kafka topics. The pipeline gateway manages ingress, consumers, status, and scheduler coordination (scheduler/pkg/kafka/pipeline/grpcserver.go, scheduler/pkg/kafka/pipeline/consumer_manager.go). The Kotlin data-flow engine subscribes to pipeline definitions and executes chaining, joins, triggers, batching, transforms, and schema handling over Kafka (scheduler/data-flow/src/main/kotlin/io/seldon/dataflow/PipelineSubscriber.kt, scheduler/data-flow/src/main/kotlin/io/seldon/dataflow/kafka/Pipeline.kt, scheduler/data-flow/src/main/kotlin/io/seldon/dataflow/kafka/Joiner.kt). Chainer APIs are in apis/mlops/chainer/chainer.proto.
Runtime, infrastructure, and operations
Deployment is packaged as Helm/Kustomize manifests, principally k8s/helm-charts/seldon-core-v2-setup/, k8s/helm-charts/seldon-core-v2-runtime/, and k8s/helm-charts/seldon-core-v2-servers/; Ansible can provision a Kind-based ecosystem via ansible/playbooks/seldon-all.yaml. Material external services are Kubernetes, Kafka and Schema Registry, Envoy, Prometheus/Grafana, and optional OpenTelemetry/Jaeger/ClickHouse. TLS, OAuth, passwords, and Kubernetes Secret integration are centralized in components/tls/pkg/; observability collection includes hodometer/cmd/hodometer/main.go.
Main entry points: control_plane.go Scheduler Control API · model_controller.go Model, Pipeline & Server Controllers · operator/main.go Kubernetes Operator · modelgateway/main.go Model Gateway
Components 20
Kubernetes Control Plane
- Seldon CLI
operator/cmd/seldon/main.go - Kubernetes Operator · Reconciles MLOps custom resources into Kubernetes workloads and lifecycle operations.
operator/main.go - MLOps CRDs · Models, Pipelines, Servers, Experiments, and runtime resources.
operator/apis/mlops/v1alpha1/model_types.go - Model, Pipeline & Server Controllers
operator/controllers/mlops/model_controller.go
Scheduling and Routing
- Scheduler Control API
scheduler/pkg/server/control_plane.go - Scheduling Policies · Selects viable server replicas for model placement.
scheduler/pkg/scheduler/scheduler.go - Control-plane Stores · Model, pipeline, experiment, and server state.
- Server Synchronizer
scheduler/pkg/synchroniser/servers_sync.go - Envoy xDS Processor · Builds xDS snapshots from live model, pipeline, and experiment state.
scheduler/pkg/envoy/processor/server.go - Scheduler & Data-plane Contracts · Scheduler, OIP V2, and chainer contracts.
apis/mlops/scheduler/scheduler.proto
Inference and Pipelines
- Envoy
- Model Gateway
scheduler/cmd/modelgateway/main.go - Pipeline Gateway · Manages ingress, consumers, status, and scheduler coordination.
scheduler/pkg/kafka/pipeline/grpcserver.go - Kafka & Schema Registry
- Kotlin Data-flow Engine · Executes graph chaining, joins, triggers, batching, transforms, and schema handling.
scheduler/data-flow/src/main/kotlin/io/seldon/dataflow/PipelineSubscriber.kt - Server Agent · Retrieves artifacts and controls readiness, draining, cache, and model usage.
scheduler/pkg/agent/server.go - Inference Server · Hosts loaded models behind Open Inference Protocol V2.
scheduler/pkg/agent/modelserver_controlplane/oip/v2.go
Runtime and Operations
- Kubernetes
- Helm/Kustomize Deployment
- Observability Stack · Prometheus/Grafana with optional OpenTelemetry, Jaeger, and ClickHouse.
hodometer/cmd/hodometer/main.go
Connections 21
- Seldon CLI → Kubernetes Operator: manages resources
- MLOps CRDs → Kubernetes Operator: defines desired state
- Kubernetes Operator → Model, Pipeline & Server Controllers: runs
- Model, Pipeline & Server Controllers → Kubernetes: reconciles workloads
- Model, Pipeline & Server Controllers → Scheduler Control API: forwards lifecycle intent
- Scheduler Control API → Control-plane Stores: updates state
- Scheduler Control API → Scheduling Policies: requests placement
- Scheduling Policies → Server Synchronizer: assignments
- Server Synchronizer → Server Agent: synchronizes desired models
- Server Agent → Inference Server: loads and controls models
- Control-plane Stores → Envoy xDS Processor: live routing state
- Envoy xDS Processor → Envoy: xDS snapshots
- Envoy → Model Gateway: model requests
- Envoy → Pipeline Gateway: pipeline requests
- Model Gateway → Inference Server: OIP V2 inference
- Pipeline Gateway → Kafka & Schema Registry: publishes and consumes
- Kafka & Schema Registry → Kotlin Data-flow Engine: pipeline events and definitions
- Kotlin Data-flow Engine → Model Gateway: pipeline model calls
- Scheduler Control API → Scheduler & Data-plane Contracts: implements
- Helm/Kustomize Deployment → Kubernetes: installs platform
- Kubernetes → Observability Stack: exports telemetry