Skip to content

Update a.core_concepts.md#189

Open
zhaohuabing wants to merge 1 commit into
dgkanatsios:mainfrom
zhaohuabing:patch-1
Open

Update a.core_concepts.md#189
zhaohuabing wants to merge 1 commit into
dgkanatsios:mainfrom
zhaohuabing:patch-1

Conversation

@zhaohuabing

Copy link
Copy Markdown

No description provided.

Comment thread a.core_concepts.md

```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
Copy Markdown
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
Copy Markdown
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

pacozaa commented Oct 16, 2022

Copy link
Copy Markdown
Contributor

@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.

3 participants