Production-Grade Container Scheduling and Management
Go to file
Kubernetes Submit Queue bfdd94c6a0
Merge pull request #59170 from cofyc/fix_kubelet_volume_metrics
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Fix kubelet PVC stale metrics

**What this PR does / why we need it**:

Volumes on each node changes, we should not only add PVC metrics into
gauge vector. It's better use a collector to collector metrics from internal
stats.

Currently, if a PV (bound to a PVC `testpv`)  is attached and used by node A, then migrated to node B or just deleted from node A later.  `testpvc` metrics will not disappear from kubelet on node A. After a long running time, `kubelet` process will keep a lot of stale volume metrics in memory.

For these dynamic metrics, it's better to use a collector to collect metrics from a data source (`StatsProvider` here), like [kube-state-metrics](https://github.com/kubernetes/kube-state-metrics) scraping metrics from kube-apiserver.

**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Fixes https://github.com/kubernetes/kubernetes/issues/57686

**Special notes for your reviewer**:

**Release note**:

```release-note
Fix kubelet PVC stale metrics
```
2018-02-15 18:44:08 -08:00
.github
api Kubernetes version v1.11.0-alpha.0 openapi-spec file updates 2018-02-14 16:07:30 -05:00
build Merge pull request #59207 from ipuustin/shell-bugfix 2018-02-13 12:29:31 -08:00
cluster Add a reviewer to addon-manager 2018-02-15 10:40:02 -08:00
cmd Move the kubeletconfig v1alpha1 API to beta, rename to kubelet.config.k8s.io 2018-02-14 17:30:22 -08:00
docs auto-generated 2018-02-11 11:04:15 +08:00
examples fix all the typos across the project 2018-02-11 11:04:14 +08:00
Godeps Add golang.org/x/tools/benchmark/parse godep. 2018-02-14 14:22:18 +01:00
hack Merge pull request #53833 from mtaufen/kubeletconfig-to-beta 2018-02-15 11:06:40 -08:00
logo
pkg Merge pull request #59170 from cofyc/fix_kubelet_volume_metrics 2018-02-15 18:44:08 -08:00
plugin rename func ValidatePodSecurityContext to ValidatePod 2018-02-14 10:55:50 +08:00
staging Merge pull request #59905 from mtaufen/dkcfg-config-ok-kubelet-config-ok 2018-02-15 11:06:36 -08:00
test Merge pull request #53833 from mtaufen/kubeletconfig-to-beta 2018-02-15 11:06:40 -08:00
third_party
translations
vendor Add golang.org/x/tools/benchmark/parse godep. 2018-02-14 14:22:18 +01:00
.bazelrc
.generated_files
.gitattributes
.gitignore fix all the typos across the project 2018-02-11 11:04:14 +08:00
.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 Update CHANGELOG-1.8.md for v1.8.8. 2018-02-09 15:01:39 -08:00
CHANGELOG-1.9.md Merge pull request #59464 from dixudx/fix_all_typos 2018-02-10 22:12:45 -08:00
CHANGELOG-1.10.md fix all the typos across the project 2018-02-11 11:04:14 +08:00
CHANGELOG.md
code-of-conduct.md
CONTRIBUTING.md
labels.yaml
LICENSE
Makefile
Makefile.generated_files
OWNERS
OWNERS_ALIASES
README.md Update README.md 2018-02-11 04:34:01 +00:00
SUPPORT.md
WORKSPACE

Kubernetes

Submit Queue Widget 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