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

Managing BestEffort pods #52

Open
larsks opened this issue Dec 17, 2021 · 0 comments
Open

Managing BestEffort pods #52

larsks opened this issue Dec 17, 2021 · 0 comments

Comments

@larsks
Copy link
Member

larsks commented Dec 17, 2021

When first starting out with Kubernetes, people are probably going to be submitting workloads that end up in the "BestEffort" quota class, such as:

apiVersion: v1
kind: Pod
metadata:
  name: sleeper-besteffort
  namespace: default
spec:
  containers:
  - args:
    - sleep
    - "1800"
    image: docker.io/alpine:latest
    name: sleeper

This makes it difficult for us to effectively manage resources; the only quota that can be set for BestEffort class pods is a limit on the number of pods. If we want to better manage resources like memory we would like to prevent people from creating BestEffort pods.

There are two ways to do this:

  • We can just set the quota for BestEffort pods to 0. Probably solved! But now when someone attempts to submit a simple workload it fails, with a message like:

    Error from server (Forbidden): error when creating "STDIN": pods "sleeper-besteffort" is forbidden: exceeded quota: besteffort-pods, requested: pods=1, used: pods=0, limited: pods=0

  • Alternately, we can add a LimitRange to the project, which would automatically apply limits (and requests) to pods that don't provide them explicitly, resulting in it having a qos class of Burstable or Guaranteed.

I think the second option is going to be friendlier to novice users, since it allows them to copy-and-paste manifests that they have found in online documentation and have them work as expected.

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

No branches or pull requests

2 participants