Defining Resource Defaults and Limitations within a Namespace

Sumit Rawal answered on June 24, 2023 Popularity 1/10 Helpfulness 1/10

Contents


More Related Answers

  • Running Resources in a Different Namespace
  • What’s the namespace your resources will run if you don’t define that configuration?
  • Defining Resource Quotas for a Namespace
  • resource type in namespace
  • resource type in namespace

  • Defining Resource Defaults and Limitations within a Namespace

    0

    We already learned how to leverage Kubernetes Namespaces to create clusters within a cluster. When combined with RBAC, we can create Namespaces and give users permissions to use them without exposing the whole cluster. Still, one thing is missing.

    We can, let’s say, create a test Namespace and allow users to create objects without permitting them to access other Namespaces. Even though that is better than allowing everyone full access to the cluster, such a strategy would not prevent people from bringing the whole cluster down or affecting the performance of applications running in other Namespaces. The piece of the puzzle we’re missing is resource control on the Namespace level.

    We already discussed that every container should have resource limits and requests defined. That information helps Kubernetes schedule Pods more efficiently. It also provides it with the information it can use to decide whether a Pod should be evicted or restarted.

    Still, the fact that we can specify resources does not mean that we are forced to define them. We should have the ability to set default resources that will be applied when we forget to specify them explicitly.

    Even if we define default resources, we also need a way to set limits. Otherwise, everyone with permissions to deploy a Pod can potentially run an application that requests more resources than we’re willing to give. 

    Popularity 1/10 Helpfulness 1/10 Language typescript
    Source: Grepper
    Link to this answer
    Share Copy Link
    Contributed on Jun 24 2023
    Sumit Rawal
    0 Answers  Avg Quality 2/10


    X

    Continue with Google

    By continuing, I agree that I have read and agree to Greppers's Terms of Service and Privacy Policy.
    X
    Grepper Account Login Required

    Oops, You will need to install Grepper and log-in to perform this action.