Overview of karmada-webhook
masterkarmada-webhook component starts a webhook server that manages mutation and validation policies for Karmada resources, such as PropagationPolicy and OverridePolicy.repository·master·Indexed 26 days ago
https://github.com/karmada-io/karmadaAn open-source, multi-cluster Kubernetes orchestration system for seamless application management across multiple clouds and clusters using native Kubernetes APIs. Documentation covers installation and management of the Karmada control plane, Karmada Operator, and Karmada Agent via Helm, including configuration for etcd, encryption-at-rest, and certificate management.
karmada-webhook component starts a webhook server that manages mutation and validation policies for Karmada resources, such as PropagationPolicy and OverridePolicy.The karmada-aggregated-apiserver is a component that starts an aggregated server. Its primary responsibilities are:
FederatedHPA is a solution designed to manage Horizontal Pod Autoscaling (HPA) across multiple Kubernetes clusters. It addresses the limitations of single-cluster HPA, such as resource exhaustion in a single cluster and the complexity of managing redundant HPA resources in multi-cluster environments.
PropagationPolicy to determine where replicas are placed (e.g., scaling up more instances in clusters with higher resource availability).cluster1 and 7 in cluster2, cluster1 handles 3/10 of the requests and cluster2 handles 7/10.PropagationPolicy.karmada-scheduler is a control plane process responsible for assigning resources to the clusters managed by Karmada. It evaluates the scheduling queue against constraints and available resources, ranks valid clusters, and binds resources to the most suitable cluster.karmada-metrics-adapter is a specialized adapter used to aggregate metrics from member clusters within a Karmada environment. It can be executed via the command line with various flags for configuration and logging.The Thirdparty Resource Interpreter allows Karmada to handle custom resources from third-party applications and operators. Customizations are defined via YAML files and organized by API group, version, and kind.
Directory Structure:
resourcecustomizations/
├── <group>/
│ └── <version>/
│ └── <kind>/
│ ├── customizations.yaml # Resource interpreter customization rules
│ └── testdata/
│ ├── <operation>-test.yaml # Test cases for specific operationsKarmada supports priority and preemption for bindings (ResourceBinding and ClusterResourceBinding). This allows the scheduler to distinguish between high-priority critical tasks and non-urgent tasks during resource contention.
Note: Binding preemption is distinct from policy preemption, which involves high-priority policies preempting low-priority policies.
The Karmada Control Plane consists of three primary components:
PropagationPolicy objects to select resources and create ResourceBinding objects.ResourceBinding objects to create Work objects.Work objects to distribute resources to member clusters.ETCD is used to store all Karmada API objects.
Version 1.13.0 introduced several significant features and optimizations:
The accurate estimator in Karmada calculates the maximum number of replicas (maxReplica) that can be scheduled on a cluster by combining multiple plugin results.
To account for resource fragmentation, the estimator follows these steps:
maxReplicas calculation for each enabled plugin (e.g., quota-aware plugins).sumReplicas) that can fit in each node.Math.min(maxReplicas, sumReplicas).This ensures that the estimation respects both cluster-wide quotas and the physical capacity of individual nodes.