Comments (7)
Hi @faizan35,
The example described in the documentation is correct.
The max value defined in the LimitRange is the maximum permissible value. However in case the Pod's container does not define a resource limit, the default CPU limit of 500m that is defined in the LimitRange will be applied (not the max value).
As the requested CPU of 700m is greater than the default limit of 500m, Kubernetes throws an error.
If you explicitly define CPU limit as 700m, the Pod will be created.
apiVersion: v1
kind: Pod
metadata:
name: example-conflict-with-limitrange-cpu
spec:
containers:
- name: demo
image: registry.k8s.io/pause:2.0
resources:
limits:
cpu: 700m
requests:
cpu: 700m
Note that if you explicitly define a CPU limit > 1, then Kubernetes will throw an error as the LimitRange defines the maximum permissible value as 1.
Hope this helps in clearing the doubt.
from website.
@adityasamant25 thank you for clearing my doubt.
from website.
@faizan35 If your doubt is resolved, please mark the issue as closed.
from website.
This issue is currently awaiting triage.
SIG Docs takes a lead on issue triage for this website, but any Kubernetes member can accept issues by applying the triage/accepted
label.
The triage/accepted
label can be added by org members by writing /triage accepted
in a comment.
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.
from website.
Page related to issue: https://kubernetes.io/docs/concepts/policy/limit-range/
/language en
from website.
/kind support
from website.
@faizan35 Happy to help!
If your doubt is resolved, please mark the issue as closed.
from website.
Related Issues (20)
- Move App Deployment from the SIG CLI guides to the kubectl reference HOT 8
- Move Extending Kubectl from the SIG CLI guides to the kubectl reference HOT 4
- Kubelet Configuration (v1) HOT 8
- Latest releases v1.29.3, v1.28.8, v1.27.12, and v1.26.15 not included in released details HOT 6
- Discrepancy in End of Life date for v1.26 in "Patch Releases" page HOT 6
- Want to create a Docker image of an existing EKS pod or any pod. HOT 4
- [es] Translate - `docs/concepts/architecture/control-plane-node-communication/` into Spanish HOT 6
- Move non-graceful node shutdown section from concepts/architecture/nodes.md to concepts/cluster-administration HOT 4
- [es] Update Translate - `docs/concepts/architecture/cgroups` into Spanish
- [es] Update Translate - `docs/concepts/architecture/cloud-controller` into Spanish
- [es] Translate - `docs/concepts/architecture/controller` into Spanish
- [es] Translate - `docs/concepts/architecture/garbage-collection` into Spanish
- [es] Translate - `docs/concepts/architecture/leases` into Spanish HOT 2
- [es] Translate - `docs/concepts/architecture/mixed-version-proxy` into Spanish
- [es] Translate - `docs/concepts/architecture/nodes` into Spanish HOT 2
- [es] localize concepts/workloads/pods/user-namespaces.md to Spanish HOT 1
- [es] localize concepts/workloads/pods/downward-api.md to Spanish HOT 4
- [es] localize concepts/workloads/pods/pod-lifecycle.md to Spanish HOT 5
- Kubernetes documentation still points to legacy package repo HOT 14
- Register annotations for Azure integration HOT 20
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from website.