|
| 1 | +--- |
| 2 | +title: "Kubernetes resource propagation from hub cluster to member clusters (preview)" |
| 3 | +description: This article describes the concept of Kubernetes resource propagation from hub cluster to member clusters. |
| 4 | +ms.date: 03/04/2024 |
| 5 | +author: shashankbarsin |
| 6 | +ms.author: shasb |
| 7 | +ms.service: kubernetes-fleet |
| 8 | +ms.topic: conceptual |
| 9 | +--- |
| 10 | + |
| 11 | +# Kubernetes resource propagation from hub cluster to member clusters (preview) |
| 12 | + |
| 13 | +[!INCLUDE [preview features note](./includes/preview/preview-callout.md)] |
| 14 | + |
| 15 | +Platform admins often need to deploy Kubernetes resources into multiple clusters, for example: |
| 16 | +* Roles and role bindings to manage who can access what. |
| 17 | +* An infrastructure application that needs to be on all clusters, for example, Prometheus, Flux. |
| 18 | + |
| 19 | +Application developers often need to deploy Kubernetes resources into multiple clusters, for example: |
| 20 | +* Deploy a video serving application into multiple clusters, one per region, for low latency watching experience. |
| 21 | +* Deploy a shopping cart application into two paired regions for customers to continue to shop during a single region outage. |
| 22 | +* Deploy a batch compute application into clusters with inexpensive spot node pools available. |
| 23 | + |
| 24 | +It's tedious to create and update these Kubernetes resources across tens or even hundreds of clusters, and track their current status in each cluster. |
| 25 | +Azure Kubernetes Fleet Manager (Fleet) provides Kubernetes resource propagation to enable at-scale management of Kubernetes resources. |
| 26 | + |
| 27 | +You can create Kubernetes resources in the hub cluster and propagate them to selected member clusters via Kubernetes Customer Resources: `MemberCluster` and `ClusterResourcePlacement`. |
| 28 | +Fleet supports these custom resources based on an [open-source cloud-native multi-cluster solution][fleet-github]. |
| 29 | + |
| 30 | +## What is `MemberCluster`? |
| 31 | + |
| 32 | +Once a cluster joins a fleet, a corresponding `MemberCluster` custom resource is created on the hub cluster. |
| 33 | +You can use it to select target clusters in resource propagation. |
| 34 | + |
| 35 | +The following labels are added automatically to all member clusters, which can be used for target cluster selection in resource propagation. |
| 36 | + |
| 37 | +* `fleet.azure.com/location` |
| 38 | +* `fleet.azure.com/resource-group` |
| 39 | +* `fleet.azure.com/subscription-id` |
| 40 | + |
| 41 | +You can find the API reference of `MemberCluster` [here][membercluster-api]. |
| 42 | + |
| 43 | +## What is `ClusterResourcePlacement`? |
| 44 | + |
| 45 | +Fleet provides `ClusterResourcePlacement` as a mechanism to control how cluster-scoped Kubernetes resources are propagated to member clusters. |
| 46 | + |
| 47 | +Via `ClusterResourcePlacement`, you can: |
| 48 | +- Select which cluster-scoped Kubernetes resources to propagate to member clusters |
| 49 | +- Specify placement policies to manually or automatically select a subset or all of the member clusters as target clusters |
| 50 | +- Specify rollout strategies to safely roll out any updates of the selected Kubernetes resources to multiple target clusters |
| 51 | +- View the propagation progress towards each target cluster |
| 52 | + |
| 53 | +In order to propagate namespace-scoped resources, you can select a namespace which by default selecting both the namespace and all the namespace-scoped resources under it. |
| 54 | + |
| 55 | +The following diagram shows a sample `ClusterResourcePlacement`. |
| 56 | +[  ](./media/conceptual-resource-propagation.png#lightbox) |
| 57 | + |
| 58 | +You can find the API reference of `ClusterResourcePlacement` [here][clusterresourceplacement-api]. |
| 59 | + |
| 60 | +## Next Steps |
| 61 | + |
| 62 | +* [Set up Kubernetes resource propagation from hub cluster to member clusters](./resource-propagation.md). |
| 63 | + |
| 64 | +<!-- LINKS - external --> |
| 65 | +[fleet-github]: https://github.com/Azure/fleet |
| 66 | +[membercluster-api]: https://github.com/Azure/fleet/blob/main/docs/api-references.md#membercluster |
| 67 | +[clusterresourceplacement-api]: https://github.com/Azure/fleet/blob/main/docs/api-references.md#clusterresourceplacement |
0 commit comments