Production-Grade Container Scheduling and Management
Go to file
Kevin Klues c6d9bbcb74 Proactively remove init Containers in CPUManager static policy
This patch fixes a bug in the CPUManager, whereby it doesn't honor the
"effective requests/limits" of a Pod as defined by:

    https://kubernetes.io/docs/concepts/workloads/pods/init-containers/#resources

The rule states that a Pod’s "effective request/limit" for a resource
should be the larger of:
    * The highest of any particular resource request or limit
      defined on all init Containers
    * The sum of all app Containers request/limit for a
      resource

Moreover, the rule states that:
    * The effective QoS tier is the same for init Containers
      and app containers alike

This means that the resource requests of init Containers and app
Containers should be able to overlap, such that the larger of the two
becomes the "effective resource request/limit" for the Pod. Likewise,
if a QoS tier of "Guaranteed" is determined for the Pod, then both init
Containers and app Containers should run in this tier.

In its current implementation, the CPU manager honors the effective QoS
tier for both init and app containers, but doesn't honor the "effective
request/limit" correctly.

Instead, it treats the "effective request/limit" as:
    * The sum of all init Containers plus the sum of all app
      Containers request/limit for a resource

It does this by not proactively removing the CPUs given to previous init
containers when new containers are being created. In the worst case,
this causes the CPUManager to give non-overlapping CPUs to all
containers (whether init or app) in the "Guaranteed" QoS tier before any
of the containers in the Pod actually start.

This effectively blocks these Pods from running if the total number of
CPUs being requested across init and app Containers goes beyond the
limits of the system.

This patch fixes this problem by updating the CPUManager static policy
so that it proactively removes any guaranteed CPUs it has granted to
init Containers before allocating CPUs to app containers. Since all init
container are run sequentially, it also makes sure this proactive
removal happens for previous init containers when allocating CPUs to
later ones.
2019-07-26 14:34:51 +02:00
.github
api Merge pull request #79425 from johscheuer/fix-networkpolicy-typo 2019-07-24 21:19:51 -07:00
build Allow customize registry name of base and release images 2019-07-25 17:43:01 -07:00
cluster Merge pull request #80566 from BenTheElder/fix-image-ref 2019-07-25 22:36:36 -07:00
cmd Merge pull request #80474 from SataQiu/fix-controllermanager-20190723 2019-07-25 20:47:58 -07:00
docs
Godeps Regenerate 2019-07-25 11:54:00 -07:00
hack Merge pull request #80548 from seans3/move-kubectl-history 2019-07-25 20:48:49 -07:00
logo
pkg Proactively remove init Containers in CPUManager static policy 2019-07-26 14:34:51 +02:00
plugin Merge pull request #79565 from tedyu/runtime-cls 2019-07-19 12:37:24 -07:00
staging Merge pull request #80624 from xuto2/master 2019-07-26 05:32:16 -07:00
test Merge pull request #80543 from davidz627/fix/makePV 2019-07-26 03:24:25 -07:00
third_party
translations
vendor Merge pull request #80495 from adityadani/update_openstorage_to_v1.0.0 2019-07-26 03:23:59 -07:00
.bazelrc
.generated_files
.gitattributes
.gitignore
.kazelcfg.json
BUILD.bazel
CHANGELOG-1.2.md
CHANGELOG-1.3.md
CHANGELOG-1.4.md
CHANGELOG-1.5.md
CHANGELOG-1.6.md
CHANGELOG-1.7.md
CHANGELOG-1.8.md
CHANGELOG-1.9.md
CHANGELOG-1.10.md
CHANGELOG-1.11.md
CHANGELOG-1.12.md
CHANGELOG-1.13.md
CHANGELOG-1.14.md
CHANGELOG-1.15.md Update CHANGELOG-1.15.md for v1.15.1. 2019-07-18 10:26:32 +00:00
CHANGELOG-1.16.md
CHANGELOG.md
code-of-conduct.md
CONTRIBUTING.md
go.mod Merge pull request #80495 from adityadani/update_openstorage_to_v1.0.0 2019-07-26 03:23:59 -07:00
go.sum Merge pull request #80495 from adityadani/update_openstorage_to_v1.0.0 2019-07-26 03:23:59 -07:00
LICENSE
Makefile
Makefile.generated_files
OWNERS
OWNERS_ALIASES doc: nominate Draven to scheduler reviewers. 2019-07-25 08:53:12 +08:00
README.md
SECURITY_CONTACTS
SUPPORT.md
WORKSPACE

Kubernetes

GoDoc Widget CII Best Practices


Kubernetes is an open source system for managing containerized applications across multiple hosts; providing basic mechanisms for deployment, maintenance, and scaling of applications.

Kubernetes builds upon a decade and a half of experience at Google running production workloads at scale using a system called Borg, combined with best-of-breed ideas and practices from the community.

Kubernetes is hosted by the Cloud Native Computing Foundation (CNCF). If you are a company that wants to help shape the evolution of technologies that are container-packaged, dynamically-scheduled and microservices-oriented, consider joining the CNCF. For details about who's involved and how Kubernetes plays a role, read the CNCF announcement.


To start using Kubernetes

See our documentation on kubernetes.io.

Try our interactive tutorial.

Take a free course on Scalable Microservices with Kubernetes.

To start developing Kubernetes

The community repository hosts all information about building Kubernetes from source, how to contribute code and documentation, who to contact about what, etc.

If you want to build Kubernetes right away there are two options:

You have a working Go environment.
go get -d k8s.io/kubernetes
cd $GOPATH/src/k8s.io/kubernetes
make
You have a working Docker environment.
git clone https://github.com/kubernetes/kubernetes
cd kubernetes
make quick-release

For the full story, head over to the developer's documentation.

Support

If you need support, start with the troubleshooting guide, and work your way through the process that we've outlined.

That said, if you have questions, reach out to us one way or another.

Analytics