The Orbit-RS Kubernetes Operator provides native Kubernetes support for deploying and managing Orbit-RS distributed actor systems.
# Install CRDs
kubectl apply -f deploy/crds.yaml
# Install RBAC and operator
kubectl apply -f deploy/rbac.yaml
kubectl apply -f deploy/operator.yaml# Deploy example cluster
kubectl apply -f deploy/examples.yaml
# Check cluster status
kubectl get orbitclusters
kubectl describe orbitcluster example-clusterManages a complete Orbit-RS cluster deployment with StatefulSet, Services, and ConfigMaps.
Key features:
- Automatic StatefulSet and Service creation
- Leader election configuration
- Transaction persistence setup
- Monitoring and metrics integration
- Rolling updates and scaling
Manages actor-specific deployments and configurations within an Orbit cluster.
Key features:
- Actor type registration
- Scaling policies
- Activation/deactivation timeouts
- Performance monitoring
Configures distributed transaction coordination and persistence.
Key features:
- Transaction coordinator setup
- Persistence backend configuration
- Recovery and failover settings
- Performance monitoring and alerting
apiVersion: orbit.turingworks.com/v1
kind: OrbitCluster
metadata:
name: my-cluster
spec:
replicas: 3
image:
repository: orbit-rs/orbit-server
tag: "latest"apiVersion: orbit.turingworks.com/v1
kind: OrbitCluster
metadata:
name: prod-cluster
spec:
replicas: 5
image:
repository: orbit-rs/orbit-server
tag: "v0.1.0"
storage:
storageClass: "fast-ssd"
size: "50Gi"
service:
serviceType: LoadBalancer
annotations:
service.beta.kubernetes.io/aws-load-balancer-type: "nlb"
resources:
cpuRequest: "500m"
memoryRequest: "1Gi"
cpuLimit: "2000m"
memoryLimit: "4Gi"The operator provides Prometheus metrics for:
- Cluster health and status
- Actor performance metrics
- Transaction success rates
- Resource utilization
Enable ServiceMonitor for Prometheus Operator:
spec:
monitoring:
enabled: true
serviceMonitor: true# Build the operator binary
cargo build --release --package orbit-operator
# Build Docker image
docker build -t orbit-rs/orbit-operator:latest -f orbit-operator/Dockerfile .# Run unit tests
cargo test --package orbit-operator
# Integration tests with kind cluster
make test-integrationThe operator consists of three main controllers:
- ClusterController: Manages OrbitCluster resources
- ActorController: Manages OrbitActor resources
- TransactionController: Manages OrbitTransaction resources
Each controller runs independently and watches for changes to their respective Custom Resources.