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
+15-16Lines changed: 15 additions & 16 deletions
Original file line number
Diff line number
Diff line change
@@ -477,14 +477,13 @@ acme-org
477
477
If you create a `HierarchicalResourceQuota` in namespace `acme-org`, the sum of
478
478
all subnamespaces' resources can't surpass the HRQ.
479
479
480
-
We will demonstrate how it works using services, but you could also limit `cpu`,
481
-
`memory`, or any other `ResourceQuota` field.
480
+
This example demonstrates how it works using services, but you could also limit
481
+
`cpu`, `memory`, or any other `ResourceQuota` field.
482
482
483
483
> _Note: Decimal point values cannot be specified (you can't do `cpu: 1.5`, but
484
484
> you can do `cpu: "1.5"` or `cpu: 1500m`). See [#292](https://github.com/kubernetes-sigs/hierarchical-namespaces/issues/292)_
485
485
486
-
Creating the HRQ:
487
-
486
+
Create the HRQ:
488
487
```bash
489
488
kubectl apply -f - << EOF
490
489
apiVersion: hnc.x-k8s.io/v1alpha2
@@ -498,16 +497,16 @@ spec:
498
497
EOF
499
498
```
500
499
501
-
Lets create Service in namespace `team-a`:
500
+
Create a Service in namespace `team-a`:
502
501
```bash
503
502
kubectl create service clusterip team-a-svc --clusterip=None -n team-a
504
503
```
505
504
506
-
And when we try to create Service in namespace `team-b`:
505
+
Now, when you try to create a Service in namespace `team-b`:
507
506
```bash
508
507
kubectl create service clusterip team-b-svc --clusterip=None -n team-b
509
508
```
510
-
We get an error:
509
+
You get an error:
511
510
```
512
511
Error from server (Forbidden):
513
512
error when creating "STDIN":
@@ -528,13 +527,13 @@ acme-org services: 1/1
528
527
```
529
528
You can also view HRQs in all namespaces by running `kubectl get hrq -A`.
530
529
531
-
> _Note: If you execute `kubectl get qouta` in namespace `acme-org`, `team-a` or `team-b`,
530
+
> _Note: If you execute `kubectl get qouta` in namespace `acme-org`, `team-a` or `team-b`,
532
531
> you will see `ResourceQuota` objects named `hrq.hnc.x-k8s.io`.
533
532
> But it is part of the internal implementation of hierarchical resource quotas and shouldn't be modified or
534
533
> inspected directly.
535
-
> Also if you inspect the namespace information
536
-
> using `kubectl describe ns <NAMESPACE NAME>`,
537
-
> you may see Resource Quotas imformation of
534
+
> Also if you inspect the namespace information
535
+
> using `kubectl describe ns <NAMESPACE NAME>`,
536
+
> you may see Resource Quotas imformation of
538
537
> `hrq.hnc.x-k8s.io`, which is also the case([#275](https://github.com/kubernetes-sigs/hierarchical-namespaces/issues/275))._
539
538
540
539
And finally, you can delete the HRQ by deleting the CR:
@@ -645,7 +644,7 @@ kubectl hns set service-1 -a
645
644
You can check if the `service-1` cascading deletion is enabled from its `.spec.allowCascadingDeletion` field of `HierarchyConfiguration`. If the value is `true`, it's enabled.
646
645
647
646
```bash
648
-
kubectl get hierarchyconfiguration hierarchy -o jsonpath='{.spec}' -n service-1
647
+
kubectl get hierarchyconfiguration hierarchy -o jsonpath='{.spec}' -n service-1
649
648
```
650
649
651
650
Expected output:
@@ -715,19 +714,19 @@ team-a
715
714
```
716
715
717
716
718
-
As the same of `service-1`, you can't delete `service-4` subnamespace which is
717
+
As the same of `service-1`, you can't delete `service-4` subnamespace which is
719
718
a parent of `staging` full namespace.
720
719
721
-
This is both to be consistent with how subnamespaces are treated,
722
-
and also because deleting `service-4` will delete any propagated objects
720
+
This is both to be consistent with how subnamespaces are treated,
721
+
and also because deleting `service-4` will delete any propagated objects
723
722
inside `staging`.
724
723
725
724
```bash
726
725
kubectl delete subns service-4 -n team-a
727
726
# forbidden
728
727
```
729
728
730
-
So you need to make `service-4` subnamespace `"allowCascadingDeletion":true` to
729
+
So you need to make `service-4` subnamespace `"allowCascadingDeletion":true` to
0 commit comments