Production-Grade Container Scheduling and Management
Go to file
Clayton Coleman a2ca66d280
kubelet: Admission must exclude completed pods and avoid races
Fixes two issues with how the pod worker refactor calculated the
pods that admission could see (GetActivePods() and
filterOutTerminatedPods())

First, completed pods must be filtered from the "desired" state
for admission, which arguably should be happening earlier in
config. Exclude the two terminal pods states from GetActivePods()

Second, the previous check introduced with the pod worker lifecycle
ownership changes was subtly wrong for the admission use case.
Admission has to include pods that haven't yet hit the pod worker,
which CouldHaveRunningContainers was filtering out (because the
pod worker hasn't seen them). Introduce a weaker check -
IsPodKnownTerminated() - that returns true only if the pod is in
a known terminated state (no running containers AND known to pod
worker). This weaker check may only be called from components that
need admitted pods, not other kubelet subsystems.

This commit does not fix the long standing bug that force deleted
pods are omitted from admission checks, which must be fixed by
having GetActivePods() also include pods "still terminating".
2021-08-25 13:31:02 -04:00
.github
api fix typo: Modify PodTrackingWithFinalizers to JobTrackingWithFinalizers 2021-08-23 15:38:30 +08:00
build generated: Run hack/update-gofmt.sh 2021-08-24 15:47:49 -04:00
CHANGELOG Merge remote-tracking branch 'origin/master' 2021-08-19 17:43:32 +00:00
cluster generated: Run hack/update-gofmt.sh 2021-08-24 15:47:49 -04:00
cmd generated: Run hack/update-gofmt.sh 2021-08-24 15:47:49 -04:00
docs
hack hack/boilerplate: Tolerate new build tag format (//go:build) 2021-08-24 15:47:49 -04:00
LICENSES Update cobra to v1.2.1 2021-08-18 15:02:25 -06:00
logo
pkg kubelet: Admission must exclude completed pods and avoid races 2021-08-25 13:31:02 -04:00
plugin Merge pull request #103603 from mengjiao-liu/update-ingress-to-v1 2021-08-24 20:24:39 -07:00
staging Merge pull request #104475 from Iceber/update-code-generate 2021-08-25 07:04:53 -07:00
test Merge pull request #104552 from claudiubelu/patch-8 2021-08-25 05:50:40 -07:00
third_party Copy golang license to staging copies 2021-08-10 17:37:28 -04:00
vendor generated: Run hack/lint-dependencies.sh and hack/update-vendor.sh 2021-08-24 15:47:47 -04:00
.generated_files
.gitattributes
.gitignore
CHANGELOG.md
code-of-conduct.md
CONTRIBUTING.md
go.mod generated: Run hack/lint-dependencies.sh and hack/update-vendor.sh 2021-08-24 15:47:47 -04:00
go.sum generated: Run hack/lint-dependencies.sh and hack/update-vendor.sh 2021-08-24 15:47:47 -04:00
LICENSE
Makefile
Makefile.generated_files
OWNERS
OWNERS_ALIASES updating co-chairs 2021-08-13 06:41:40 +00:00
README.md
SECURITY_CONTACTS
SUPPORT.md

Kubernetes (K8s)

GoPkg Widget CII Best Practices


Kubernetes, also known as K8s, is an open source system for managing containerized applications across multiple hosts. It provides 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 your company 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 K8s

See our documentation on kubernetes.io.

Try our interactive tutorial.

Take a free course on Scalable Microservices with Kubernetes.

To use Kubernetes code as a library in other applications, see the list of published components. Use of the k8s.io/kubernetes module or k8s.io/kubernetes/... packages as libraries is not supported.

To start developing K8s

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.
mkdir -p $GOPATH/src/k8s.io
cd $GOPATH/src/k8s.io
git clone https://github.com/kubernetes/kubernetes
cd 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.