Kubeocean is an open-source add-ons that supports converging cross-cluster computing resources in the form of virtual nodes within a Kubernetes cluster, much like an ocean. This cluster is also referred to as the computing cluster. All Pods deployed on virtual nodes managed by Kubeocean are automatically mapped and synchronized to the corresponding worker clusters for deployment, thereby enabling cross-cluster reuse of computing resources. The system adopts a controller pattern to implement dynamic resource extraction, virtual node management, and workload scheduling.
Lightweight and Non-intrusive Worker Cluster Registration
Worker clusters only need to deploy RBAC resources and provide the corresponding kubeconfig to complete registration, without deploying additional components. Kubeocean leverages the granted permissions to automatically complete cluster connection, virtual node registration, and other functions.
Flexible and Dynamic Resource Extraction and Constraints
Each worker cluster can flexibly configure the node scope from which computing resources can be extracted, the size and scope of extracted resources, and the time window during which resources can be extracted through resourceLeasingPolicy. For example: limit extraction to a maximum of 50% of CPU resources (to avoid affecting online services); only allow resource extraction during weekday nights, available all day on weekends (tidal reuse); only extract node resources with "GPU model A10" (to match model training requirements).
Global Unified Optimal Scheduling
Each node with cross-cluster resource extraction is registered as a virtual node on a one-to-one basis, enabling the computing cluster to have a globally unified scheduling view, achieving globally optimal scheduling strategies, minimizing resource fragmentation, and improving resource utilization.
Native and Seamless Workload Deployment
Deploying workload in the computing cluster managed by Kubeocean requires no modifications. The component automatically implements native Kubernetes capabilities, deploying, running, and recycling Pods on virtual nodes and their dependent resources (such as configmaps, secrets, etc.) across clusters.
Minimal Permission Security Control
Pods mapped and created by Kubeocean in worker clusters are centralized in a single namespace, and all operations on worker clusters are based on the minimal permission kubeconfig granted during registration, minimizing the impact on worker clusters.
High Availability Design and Fault Isolation
All components support multi-replica deployment and Leader Election mechanism, while each physical cluster is managed by an independent Syncer instance, ensuring that single point failures do not affect the overall system.
Data Flow Architecture:
Control Flow Architecture:
Primary Responsibility: Central control plane component responsible for managing cluster bindings
Core Functions:
- Monitor ClusterBinding resource changes
- Automatically create and manage Kubeocean Syncer components
- Manage cluster binding lifecycle
Deployment Method: Supports multi-replica deployment
Primary Responsibility: Responsible for bidirectional synchronization between specific physical clusters and virtual clusters
Core Functions:
- Each instance is dedicated to synchronizing work for one physical cluster
- Supports multi-replica deployment through Leader Election mechanism
- Contains Bottom-up Syncer and Top-down Syncer submodules
- Independent fault recovery and scaling capabilities
Deployment Method: One Syncer instance per physical cluster, supports multi-replica deployment
Primary Responsibility: Request proxy component responsible for forwarding Kubelet API requests from virtual nodes to physical nodes
Core Functions:
- Listen to requests on port 10250 (Kubelet port) on virtual nodes
- Proxy requests to the actual physical nodes in worker clusters
- Implement native Kubernetes capabilities such as
kubectl logs,kubectl exec, etc. - Handle authentication and authorization for cross-cluster requests
- Support TLS-encrypted connections
Key Features:
- Transparent proxy without modifying client behavior
- Support multiple concurrent connections
- Automatic routing to the correct physical node based on virtual node mapping
- Maintain connection stability and handle network failures gracefully
Deployment Method: One Proxier instance per physical cluster, supports multi-replica deployment
Responsibility: Manage physical cluster registration and validation
Main Functions:
- Handle CRUD operations for ClusterBinding resources
- Validate cluster connectivity and permissions
- Create corresponding Kubeocean Syncer instances for each ClusterBinding
- Manage Syncer configuration and status
- Handle cluster binding lifecycle management
Key Features:
- Automatically create Syncer's Deployment, ServiceAccount, ClusterRole, and other resources
- Support retry mechanism for cluster connection failures
- Provide detailed status management and event recording
Responsibility: Resource synchronization from physical clusters to virtual clusters
Main Functions:
- Monitor physical cluster node and Pod status changes
- Calculate extractable resources based on ResourceLeasingPolicy
- Create and update virtual nodes
- Synchronize Pod status to virtual clusters
Included Submodules:
Responsibility: Physical node controller, responsible for virtual node creation and management
Main Functions:
- Monitor physical cluster node changes
- Calculate extractable resources based on ResourceLeasingPolicy
- Create and update virtual nodes
- Manage virtual node lifecycle
- Handle node deletion and resource reclamation
Key Features:
- Support node selectors and resource policies
- Automatically calculate virtual node resource capacity
- Handle graceful reclamation of node deletion
Responsibility: Physical Pod controller, responsible for Pod status synchronization
Main Functions:
- Monitor physical cluster Pod status changes
- Synchronize Pod status to virtual clusters
- Validate Pod Kubeocean management labels
- Handle Pod deletion and status updates
Key Features:
- Only synchronize Kubeocean-managed Pods
- Ensure idempotency of status synchronization
- Handle graceful processing of Pod deletion
Responsibility: Physical CSI node controller, responsible for storage-related node information synchronization
Main Functions:
- Monitor physical cluster CSINode changes
- Synchronize CSI node information to virtual clusters
- Manage virtual CSI node lifecycle
- Handle storage driver information synchronization
Key Features:
- Support dynamic discovery of storage drivers
- Ensure storage functionality availability
- Handle cleanup of CSI node deletion
Responsibility: Resource leasing policy controller, responsible for policy application and resource calculation
Main Functions:
- Monitor ResourceLeasingPolicy changes
- Trigger node re-evaluation
- Apply resource policies to physical nodes
- Manage policy lifecycle
Key Features:
- Support time windows and resource limits
- Automatically trigger node re-evaluation
- Handle resource reclamation on policy deletion
Responsibility: Lease controller, responsible for virtual node lease management
Main Functions:
- Create and manage leases for each virtual node
- Periodically renew leases to ensure node active status
- Handle lease expiration and node cleanup
- Support graceful lease termination
Key Features:
- Automatic lease renewal mechanism
- Support lease expiration handling
- Graceful termination and cleanup
Responsibility: Resource synchronization from virtual clusters to physical clusters
Main Functions:
- Monitor resource creation in virtual clusters
- Map resources to target physical clusters
- Handle resource name conflicts and namespace mapping
- Maintain resource mapping relationships
Included Submodules:
Responsibility: Virtual Pod controller, responsible for Pod creation and synchronization
Main Functions:
- Monitor virtual cluster Pod creation
- Create corresponding Pods in physical clusters
- Handle Pod deletion and lifecycle management
- Maintain mapping relationships between virtual and physical Pods
Key Features:
- Support bidirectional Pod mapping
- Handle graceful cleanup of Pod deletion
- Ensure idempotency of Pod creation
- Support Pod status synchronization
Responsibility: Virtual ConfigMap controller, responsible for ConfigMap synchronization
Main Functions:
- Monitor virtual cluster ConfigMap creation
- Create corresponding ConfigMaps in physical clusters
- Handle ConfigMap updates and deletion
- Maintain ConfigMap mapping relationships
Key Features:
- Support bidirectional ConfigMap synchronization
- Handle conflict resolution for ConfigMap updates
- Ensure data consistency
Responsibility: Virtual Secret controller, responsible for Secret synchronization
Main Functions:
- Monitor virtual cluster Secret creation
- Create corresponding Secrets in physical clusters
- Handle Secret updates and deletion
- Maintain Secret mapping relationships
Key Features:
- Support bidirectional Secret synchronization
- Handle secure transmission of sensitive data
- Ensure Secret data consistency
Responsibility: Virtual PVC controller, responsible for PersistentVolumeClaim synchronization
Main Functions:
- Monitor virtual cluster PVC creation
- Validate physical cluster PVC existence
- Handle PVC status synchronization
- Maintain PVC mapping relationships
Key Features:
- Only synchronize vPod-associated PVCs
- Validate PVC binding status
- Ensure storage resource consistency
Responsibility: Virtual PV controller, responsible for PersistentVolume synchronization
Main Functions:
- Monitor virtual cluster PV creation
- Validate physical cluster PV existence
- Handle PV status synchronization
- Maintain PV mapping relationships
Key Features:
- Only synchronize vPod-associated PVs
- Validate PV availability
- Ensure storage resource consistency
Purpose: Define binding relationships between physical clusters and virtual clusters
Main Fields:
clusterID: Unique cluster identifiersecretRef: Secret reference containing kubeconfignodeSelector: Node selectormountNamespace: Resource mount namespaceserviceNamespaces: List of service synchronization namespaces
kubeocean.io/managed-by: Identifies resources managed by Kubeoceankubeocean.io/cluster-binding: Associated cluster bindingkubeocean.io/physical-cluster-id: Physical cluster IDkubeocean.io/physical-node-name: Physical node name
kubeocean.io/physical-pod-namespace: Physical Pod namespacekubeocean.io/physical-pod-name: Physical Pod namekubeocean.io/physical-pod-uid: Physical Pod UIDkubeocean.io/virtual-pod-namespace: Virtual Pod namespacekubeocean.io/virtual-pod-name: Virtual Pod namekubeocean.io/virtual-pod-uid: Virtual Pod UID
kubeocean.io/last-sync-time: Last synchronization timekubeocean.io/policies-applied: List of applied policieskubeocean.io/expected-metadata: Expected metadata
- Independent Syncer instances for each physical cluster
- Single Syncer failure does not affect other clusters
- Support automatic Syncer restart and recovery
- Use Kubernetes native state management mechanisms
- Support graceful deletion and cleanup of resources
- Provide detailed error information and retry mechanisms
- Kubeocean Manager supports multi-replica deployment
- Each Syncer supports multi-replica deployment
- Support automatic component scaling
- Prometheus metrics exposed at
:8080/metrics - Includes cluster binding, synchronization latency, error counts, and other metrics
- Support custom metrics and alerting rules
- Liveness probe:
:8081/healthz - Readiness probe:
:8081/readyz - Support graceful startup and shutdown
- Structured log format
- Support different log levels
- Include component, operation, and other contextual information
- Principle of least privilege
- Configure dedicated ServiceAccount for each component
- Support permission separation and fine-grained control
- Support TLS-encrypted inter-cluster communication
- Use Secrets to store sensitive kubeconfig information
- Support network policies and access control
- Run components in dedicated namespaces
- Support resource quotas and limits
- Ensure secure isolation between components

