Git Product home page Git Product logo

Comments (7)

adityasamant25 avatar adityasamant25 commented on May 25, 2024 2

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.

faizan35 avatar faizan35 commented on May 25, 2024 1

@adityasamant25 thank you for clearing my doubt.

from website.

adityasamant25 avatar adityasamant25 commented on May 25, 2024 1

@faizan35 If your doubt is resolved, please mark the issue as closed.

from website.

k8s-ci-robot avatar k8s-ci-robot commented on May 25, 2024

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.

dipesh-rawat avatar dipesh-rawat commented on May 25, 2024

Page related to issue: https://kubernetes.io/docs/concepts/policy/limit-range/
/language en

from website.

adityasamant25 avatar adityasamant25 commented on May 25, 2024

/kind support

from website.

adityasamant25 avatar adityasamant25 commented on May 25, 2024

@faizan35 Happy to help!
If your doubt is resolved, please mark the issue as closed.

from website.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.