You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 17, 2025. It is now read-only.
Copy file name to clipboardExpand all lines: docs/user-guide/quickstart.md
+11-33
Original file line number
Diff line number
Diff line change
@@ -475,9 +475,12 @@ acme-org
475
475
```
476
476
477
477
You can create a `HierarchicalResourceQuota` in namespace `acme-org`, and the sum of
478
-
all subnamespaces resource usage cant go over what is configured in the hrq.
478
+
all subnamespaces resource usage can't go over what is configured in the HRQ.
479
479
480
-
Creating the hrq:
480
+
We will demonstrate how it works using services, but you could also limit `cpu`,
481
+
`memory`or any other `ResourceQuota` field.
482
+
483
+
Creating the HRQ:
481
484
```bash
482
485
kubectl apply -f - << EOF
483
486
kind: HierarchicalResourceQuota
@@ -493,38 +496,12 @@ EOF
493
496
494
497
Lets create Service in namespace `team-a`:
495
498
```bash
496
-
kubectl apply -f - << EOF
497
-
kind: Service
498
-
apiVersion: v1
499
-
metadata:
500
-
name: team-a-svc
501
-
namespace: team-a
502
-
spec:
503
-
selector:
504
-
place: holder
505
-
ports:
506
-
- protocol: TCP
507
-
port: 80
508
-
targetport: 80
509
-
EOF
499
+
kubectl create service clusterip team-a-svc --clusterip="None" -n team-a
510
500
```
511
501
512
502
And when we try to create Service in namespace `team-b`:
513
503
```bash
514
-
kubectl apply -f - << EOF
515
-
kind: Service
516
-
apiVersion: v1
517
-
metadata:
518
-
name: team-b-svc
519
-
namespace: team-b
520
-
spec:
521
-
selector:
522
-
place: holder
523
-
ports:
524
-
- protocol: TCP
525
-
port: 80
526
-
targetport: 80
527
-
EOF
504
+
kubectl create service clusterip team-b-svc --clusterip="None" -n team-b
528
505
```
529
506
We get an error:
530
507
```
@@ -539,17 +516,18 @@ To view the HRQ usage, simply run:
539
516
```bash
540
517
kubectl hns hrq -n acme-org
541
518
```
542
-
you can also view in all namespace:
519
+
You can also view in all namespace:
543
520
```bash
544
521
kubectl hns hrq --all-namespaces
545
522
```
546
523
547
-
and you can delete the hrq via simply deleting the CR:
524
+
And you can delete the HRQ via simply deleting the CR:
548
525
```bash
549
526
kubectl delete hrq acme-org-hrq -n acme-org
550
527
```
551
528
552
-
Note: Decimal point values cannot be specified (you can't do `cpu: 1.5` but you can do `cpu: "1.5"` or `cpu: 1500m`). See [#292](https://github.com/kubernetes-sigs/hierarchical-namespaces/issues/292)
529
+
Note: Decimal point values cannot be specified (you can't do `cpu: 1.5` but
530
+
you can do `cpu: "1.5"` or `cpu: 1500m`). See [#292](https://github.com/kubernetes-sigs/hierarchical-namespaces/issues/292)
0 commit comments