Production-Grade Container Scheduling and Management
Go to file
Kubernetes Submit Queue e903c58c9e Merge pull request #45614 from yujuhong/container-metrics
Automatic merge from submit-queue (batch tested with PRs 45809, 46515, 46484, 46516, 45614)

CRI: add methods for container stats

**What this PR does / why we need it**:
Define methods in CRI to get container stats.

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: 
Part of  https://github.com/kubernetes/features/issues/290; addresses #27097

**Special notes for your reviewer**:
This PR defines the *minimum required* container metrics for the existing components to function, loosely based on the previous discussion on [core metrics](https://github.com/kubernetes/community/blob/master/contributors/design-proposals/core-metrics-pipeline.md) as well as the existing cadvisor/summary APIs.
 
Two new RPC calls are added to the RuntimeService: `ContainerStats` and `ListContainerStats`. The former retrieves stats for a given container, while the latter gets stats for all containers in one call.
 
The stats gathering time of each subsystem can vary substantially (e.g., cpu vs. disk), so even though the on-demand model preferred due to its simplicity, we’d rather give the container runtime more flexibility to determine the collection frequency for each subsystem*. As a trade-off, each piece of stats for the subsystem must contain a timestamp to let kubelet know how fresh/recent the stats are. In the future, we should also recommend a guideline for how recent the stats should be in order to ensure the reliability (e.g., eviction) and the responsiveness (e.g., autoscaling) of the kubernetes cluster.
 
The next step is to plumb this through kubelet so that kubelet can choose consume container stats from CRI or cadvisor. 
 
**Alternatively, we can add calls to get stats of individual subsystems. However, kubelet does not have the complete knowledge of the runtime environment, so this would only lead to unnecessary complexity in kubelet.*


**Release note**:

```release-note
Augment CRI to support retrieving container stats from the runtime.
```
2017-05-26 16:59:08 -07:00
.github Redirect kubeadm issues to kubeadm repo 2017-05-19 12:18:55 +02:00
api generated 2017-05-26 00:14:11 -07:00
build Merge pull request #46269 from xiangpengzhao/fix-make-helpinfo 2017-05-26 01:33:30 -07:00
cluster Merge pull request #46473 from thockin/enable-masq-agent-gce 2017-05-26 10:14:00 -07:00
cmd Merge pull request #46440 from deads2k/crd-03-invert 2017-05-26 15:59:03 -07:00
docs Merge pull request #42256 from shiywang/edit 2017-05-26 15:58:57 -07:00
examples Update GlusterFS examples readme. 2017-05-25 10:47:18 +05:30
federation Merge pull request #46440 from deads2k/crd-03-invert 2017-05-26 15:59:03 -07:00
Godeps Merge pull request #45269 from xilabao/update-gopass 2017-05-25 07:20:59 -07:00
hack Merge pull request #45809 from CaoShuFeng/non-resource-url-create-rolebinding 2017-05-26 16:47:06 -07:00
hooks
logo
pkg Merge pull request #45614 from yujuhong/container-metrics 2017-05-26 16:59:08 -07:00
plugin Update RBAC policy for configmap locked leader leasing. 2017-05-24 16:32:12 -05:00
staging Merge pull request #46440 from deads2k/crd-03-invert 2017-05-26 15:59:03 -07:00
test Merge pull request #46484 from guoyunxian/remove 2017-05-26 16:59:04 -07:00
third_party
translations Add Simplified Chinese translation for kubectl 2017-05-19 16:18:24 +08:00
vendor Merge pull request #45269 from xilabao/update-gopass 2017-05-25 07:20:59 -07:00
.bazelrc
.gazelcfg.json
.generated_files
.gitattributes
.gitignore
BUILD.bazel
CHANGELOG.md Update CHANGELOG.md for v1.6.4. 2017-05-19 12:30:25 -07:00
code-of-conduct.md
CONTRIBUTING.md
labels.yaml
LICENSE
Makefile
Makefile.generated_files
OWNERS
OWNERS_ALIASES Move PDB controller and type ownership to SIG-Apps 2017-05-22 12:55:28 -07:00
README.md
Vagrantfile
WORKSPACE

Kubernetes

Submit Queue Widget GoDoc Widget


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

If you are less impatient, 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