How karmada-io/karmada works
Karmada is a Kubernetes-native, multi-cluster orchestration control plane. The principal workflow is that users submit workloads and propagation policies to the control-plane API; controllers and the scheduler select member clusters, create per-cluster Work objects, and the execution controller applies those resources to member-cluster APIs. Separate controller branches support cluster lifecycle and health, recovery, scaling, and cross-cluster services; search and the operator provide additional product capabilities. The workflow edges follow the README; sampled source corroborates execution, cluster, search, and scaling responsibilities, but does not expose every controller’s wiring.
Main entry points: controllermanager.go Controller Manager · apiserver.go Karmada API · binding_types.go Resource Bindings · binding_controller.go Binding Controller
Components 22
Control Plane
- Karmada API
pkg/aggregatedapiserver/apiserver.go - Control-Plane etcd
- Karmada API Types
pkg/apis - Controller Manager
cmd/controller-manager/app/controllermanager.go
Propagation
- Scheduler
pkg/scheduler/scheduler.go - Binding Controller
pkg/controllers/binding/binding_controller.go - Resource Bindings
pkg/apis/work/v1alpha2/binding_types.go - Work Objects
pkg/apis/work/v1alpha1/work_types.go - Dependency Distribution
pkg/dependenciesdistributor/dependencies_distributor.go - Resource Interpreter
pkg/resourceinterpreter/interpreter.go
Member Clusters
- Cluster Controller
pkg/controllers/cluster/cluster_controller.go - Cluster Status
pkg/controllers/status/cluster_status_controller.go - Execution Controller
pkg/controllers/execution/execution_controller.go - Member Cluster APIs
Product Capabilities
- Failover Controllers
pkg/controllers/applicationfailover - Federated Autoscaling
pkg/controllers/federatedhpa/federatedhpa_controller.go - Multi-Cluster Services
pkg/controllers/multiclusterservice/mcs_controller.go - Multi-Cluster Search
pkg/search/apiserver.go - Search Storage
pkg/registry/search/storage/search.go
Operations
- Karmada Operator
operator/pkg/controller/karmada/controller.go - karmadactl
pkg/karmadactl/karmadactl.go
Other components
- Kubernetes User
Connections 24
- Kubernetes User → Karmada API: submits resources
- Karmada API → Control-Plane etcd: stores objects
- Karmada API → Karmada API Types: serves types
- Controller Manager → Karmada API: watches objects
- Controller Manager → Cluster Controller: runs controller
- Controller Manager → Cluster Status: runs controller
- Controller Manager → Binding Controller: runs controller
- Controller Manager → Execution Controller: runs controller
- Cluster Controller → Member Cluster APIs: manages clusters
- Cluster Status → Member Cluster APIs: checks health
- Scheduler → Resource Bindings: selects clusters
- Binding Controller → Resource Bindings: creates bindings
- Binding Controller → Work Objects: creates per-cluster work
- Execution Controller → Work Objects: watches work
- Execution Controller → Member Cluster APIs: applies resources
- Dependency Distribution → Member Cluster APIs: distributes dependencies
- Resource Interpreter → Controller Manager: provides interpretation
- Failover Controllers → Resource Bindings: handles failover
- Federated Autoscaling → Member Cluster APIs: scales workloads
- Multi-Cluster Services → Resource Bindings: propagates services
- Multi-Cluster Search → Search Storage: queries resources
- Multi-Cluster Search → Member Cluster APIs: collects cluster data
- Karmada Operator → Karmada API: manages control plane
- karmadactl → Karmada API: administers resources