Skip to content

Commit a3865b8

Browse files
Merge pull request #279645 from Nickomang/fleet-crp-portal
Fleet CRP portal
2 parents a71d16f + 2869a25 commit a3865b8

24 files changed

+171
-6
lines changed

articles/kubernetes-fleet/cluster-resource-override.md

Lines changed: 47 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,9 @@ rules:
178178

179179
`jsonPatchOverrides` apply a JSON patch on the selected resources following [RFC 6902](https://datatracker.ietf.org/doc/html/rfc6902).
180180

181-
## Apply the cluster resource override
181+
## Apply the cluster resource placement
182+
183+
### [Azure CLI](#tab/azure-cli)
182184

183185
1. Create a `ClusterResourcePlacement` resource to specify the placement rules for distributing the cluster resource overrides across the cluster infrastructure, as shown in the following example. Make sure you select the appropriate resource.
184186

@@ -245,9 +247,52 @@ rules:
245247
Type: Overridden
246248
...
247249
```
248-
250+
249251
The `ClusterResourcePlacementOverridden` condition indicates whether the resource override was successfully applied to the selected resources in the clusters. Each cluster maintains its own `Applicable Cluster Resource Overrides` list, which contains the cluster resource override snapshot if relevant. Individual status messages for each cluster indicate whether the override rules were successfully applied.
250252

253+
### [Portal](#tab/azure-portal)
254+
255+
1. On the Azure portal overview page for your Fleet resource, in the **Fleet Resources** section, select **Resource placements**.
256+
257+
1. Select **Create**.
258+
259+
1. Create a `ClusterResourcePlacement` resource to specify the placement rules for distributing the cluster resource overrides across the cluster infrastructure, as shown in the following example. Make sure you select the appropriate resource. Replace the default template with the YAML example below, and select **Add**.
260+
261+
:::image type="content" source="./media/cluster-resource-override/crp-create-inline.png" lightbox="./media/cluster-resource-override/crp-create.png" alt-text="A screenshot of the Azure portal page for creating a resource placement, showing the YAML template with placeholder values.":::
262+
263+
```yaml
264+
apiVersion: placement.kubernetes-fleet.io/v1beta1
265+
kind: ClusterResourcePlacement
266+
metadata:
267+
name: crp
268+
spec:
269+
resourceSelectors:
270+
- group: rbac.authorization.k8s.io
271+
kind: ClusterRole
272+
version: v1
273+
name: secret-reader
274+
policy:
275+
placementType: PickAll
276+
affinity:
277+
clusterAffinity:
278+
requiredDuringSchedulingIgnoredDuringExecution:
279+
clusterSelectorTerms:
280+
- labelSelector:
281+
matchLabels:
282+
env: prod
283+
```
284+
285+
This example distributes resources across all clusters labeled with `env: prod`. As the changes are implemented, the corresponding `ClusterResourceOverride` configurations will be applied to the designated clusters, triggered by the selection of matching cluster role resource, `secret-reader`.
286+
287+
288+
1. Verify that the cluster resource placement is created successfully.
289+
290+
:::image type="content" source="./media/cluster-resource-override/crp-success-inline.png" lightbox="./media/cluster-resource-override/crp-success.png" alt-text="A screenshot of the Azure portal page for cluster resource placements, showing a successfully created cluster resource placement.":::
291+
292+
1. Verify the cluster resource placement applied to the selected resources by selecting the resource from the list and checking the status.
293+
294+
---
295+
251296
## Next steps
252297

253298
To learn more about Fleet, see the following resources:

articles/kubernetes-fleet/intelligent-resource-placement.md

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ Kubernetes Fleet provides resource placement capability that can make scheduling
2323

2424
[!INCLUDE [preview-callout](./includes/preview/preview-callout.md)]
2525

26+
This article discusses creating cluster resource placements, which can be done via Azure CLI or the Azure portal. For more, see [Propagate resources from a Fleet hub cluster to member clusters](./quickstart-resource-propagation.md).
27+
2628
## Prerequisites
2729

2830
* Read the [resource propagation conceptual overview](./concepts-resource-propagation.md) to understand the concepts and terminology used in this quickstart.
@@ -225,15 +227,28 @@ spec:
225227

226228
In this example, a cluster would only receive extra weight if it has the label `env=prod`. If it satisfies that label based constraint, then the cluster is given proportional weight based on the amount of total CPU in that member cluster.
227229

228-
229230
## Clean up resources
230231

231-
If you no longer wish to use the `ClusterResourcePlacement` objects created in this article, you can delete them using the `kubectl delete` command. For example:
232+
### [Azure CLI](#tab/azure-cli)
233+
234+
If you no longer wish to use the `ClusterResourcePlacement` object, you can delete it using the `kubectl delete` command. The following example deletes the `ClusterResourcePlacement` object named `crp`:
232235

233236
```bash
234-
kubectl delete clusterresourceplacement <name-of-the-crp-resource>
237+
kubectl delete clusterresourceplacement crp
235238
```
236239

240+
### [Portal](#tab/azure-portal)
241+
242+
If you no longer wish to use your cluster resource placement, you can delete it from the Azure portal:
243+
244+
1. On the Azure portal overview page for your Fleet resource, in the **Fleet Resources** section, select **Resource placements**.
245+
246+
1. Select the cluster resource placement objects you want to delete, then select **Delete**.
247+
248+
1. In the **Delete** tab, verify the correct objects are chosen. Once you're ready, select **Confirm delete** and **Delete**.
249+
250+
---
251+
237252
## Next steps
238253

239254
To learn more about resource propagation, see the following resources:
70.7 KB
Loading
106 KB
Loading
91.5 KB
Loading
141 KB
Loading
57.5 KB
Loading
69.5 KB
Loading
52.2 KB
Loading
86.1 KB
Loading

0 commit comments

Comments
 (0)