Production-Grade Container Scheduling and Management
Go to file
Peter Hunt 1c3357db76 kubelet/stats: take container log stats into account when checking ephemeral stats
this commit updates checkEphemeralStorage to be able to add container log stats, if applicable.

It also updates the old check when container log stats aren't found to be more accurate.
Specifically, this check previously worked because of a fluke programming accident:

according to this block in pkg/kubelet/stats/helper.go:113
```
if result.Rootfs != nil {
    rootfsUsage := *cfs.BaseUsageBytes
    result.Rootfs.UsedBytes = &rootfsUsage
}
```

BaseUsageBytes should be the value added, not TotalUsageBytes. However, since in this case
one also needs to account for the calculated log size, which is TotalUsageBytes - BaseUsageBytes
using TotalUsageBytes value accidentally worked.

Updating the case to use the correct value AND log offset fixes this accident and makes
the behavior more in line with what happens when calculating ephemeral storage.

Signed-off-by: Peter Hunt <pehunt@redhat.com>
2022-02-15 16:30:25 -05:00
.github
api Merge pull request #107650 from apelisse/update-managedfields-time-field-description 2022-02-10 23:32:03 -08:00
build Update Go to 1.17.7 2022-02-12 13:06:08 +01:00
CHANGELOG Merge pull request #107712 from sanposhiho/patch-1 2022-02-11 11:48:11 -08:00
cluster cluster/ - Configure containerd only if necessary 2022-02-10 14:24:14 -08:00
cmd Merge pull request #108109 from eddiezane/ez/update-sig-cli-owners 2022-02-14 12:06:30 -08:00
docs
hack Update sig-cli OWNERS 2022-02-14 10:55:35 -07:00
LICENSES
logo
pkg kubelet/stats: take container log stats into account when checking ephemeral stats 2022-02-15 16:30:25 -05:00
plugin Merge pull request #107880 from liggitt/kubectl-auth-token 2022-02-09 14:10:01 -08:00
staging Update sig-cli OWNERS 2022-02-14 10:55:35 -07:00
test Merge pull request #108093 from hakman/remove_e2e_flag_container-runtime 2022-02-14 14:04:31 -08:00
third_party
vendor Updated k8s.io/utils dependency 2022-02-11 13:03:54 +05:30
.generated_files
.gitattributes
.gitignore
.golangci.yaml
CHANGELOG.md
code-of-conduct.md
CONTRIBUTING.md
go.mod Updated k8s.io/utils dependency 2022-02-11 13:03:54 +05:30
go.sum Updated k8s.io/utils dependency 2022-02-11 13:03:54 +05:30
LICENSE
Makefile
Makefile.generated_files
OWNERS
OWNERS_ALIASES Update sig-cli OWNERS 2022-02-14 10:55:35 -07: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.