Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update a.core_concepts.md #189

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

zhaohuabing
Copy link

No description provided.

@@ -147,7 +147,7 @@ kubectl create namespace myns -o yaml --dry-run=client
<p>

```bash
kubectl create quota myrq --hard=cpu=1,memory=1G,pods=2 --dry-run=client -o yaml
kubectl create quota myrq --hard=limits.cpu=1,limits.memory=1G,pods=2 --dry-run=client -o yaml
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you! Is this a recent change on Kubernetes APIs?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Kubernetes documentation says that the cpu and memory resource have two types of quota: limits and requests.

Resource Name Description
limits.cpu Across all pods in a non-terminal state, the sum of CPU limits cannot exceed this value.
limits.memory Across all pods in a non-terminal state, the sum of memory limits cannot exceed this value.
requests.cpu Across all pods in a non-terminal state, the sum of CPU requests cannot exceed this value.
requests.memory Across all pods in a non-terminal state, the sum of memory requests cannot exceed this value.

Based on the context of the asked question, I think we should use limits quota here.

@pacozaa
Copy link
Contributor

pacozaa commented Oct 16, 2022

@zhaohuabing Check out the https://kubernetes.io/docs/reference/generated/kubectl/kubectl-commands#-em-quota-em-

hard is A comma-delimited set of resource=quantity pairs that define a hard limit.

This means it's already --hard means to set hard limit already, so no need to redundant the limit part.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants