Updated on 2022-04-02 GMT+08:00

Propagation Policies

Karmada provides an independent policy API to configure resource propagation policies. For more information about Karmada, see Karmada.

Creating a Propagation Policy

  1. Log in to the MCP console. In the navigation pane, choose Policy Center > Propagation Policies, and click Create Propagation Policy.
  2. Set basic information about the propagation policy.

    • Policy Name: Name of a propagation policy to be created, which must be unique.
    • Namespace: Namespace to which the workload belongs.
    • Associated Resource Type: Select the type of the resources to be associated. For a CRD resource, you can set the kind, API version, and name for it.
    • Associated Resource: Select resources to be associated.

      Create a resource template in Karmada before associating the resources.

    • Cluster: Cluster to which associated resources can be scheduled. If this parameter is not set, resources in any cluster can be scheduled.
    • Provider: Vendor of clusters to which the associated resource can be scheduled. If this parameter is not set, the resource can be scheduled to clusters of any vendor.
    • Region: Region to which associated resources can be scheduled. If this parameter is not set, the resource can be scheduled to clusters in any region.
    • Label: Label of the cluster to which associated resources can be scheduled. If this parameter is not set, labels are not considered during resource scheduling.
    • Toleration: Tolerance of associated resources to cluster stains. If this parameter is not set, cluster taint is not considered during scheduling.

      You can set the cluster taint by choosing Cluster Overview > Taints tab page on the cluster console.

    Karmada calculates the clusters to which associated resources can be scheduled based on the cluster, provider, region, label, and taint tolerance.

  3. After configuration, click Create.
  4. Check the scheduling result.

    1. Choose Policy Center > Propagation Policies, and click the name of the target propagation policy to open its details page.

    2. In the Cluster Distribution section, you can view the target cluster to which associated resources are scheduled.

  5. Click Cluster Console to go to the console of the target cluster. You can see that the associated resources have been scheduled to the cluster.

    When multiple propagation policies are associated with the same resource, only the last policy (based on the lexicographical order of the policy names) takes effect. You are not advised to associate multiple propagation policies with the same resource.

Updating a Propagation Policy

  1. Log in to the MCP console. In the navigation pane, choose Policy Center > Propagation Policies.
  2. In the policy list, click Update in the Operation column of the propagation policy to be updated.
  3. Update the label and taint information of the propagation policy.

    • Label: Label of the cluster to which associated resources can be scheduled. If this parameter is not set, labels are not considered during resource scheduling.
    • Toleration: Tolerance of associated resources to cluster stains. If this parameter is not set, cluster taint is not considered during scheduling.

  4. Click Update.