![]() Automatic merge from submit-queue Implement 'kubectl top' command ```release-note Added 'kubectl top' command showing the resource usage metrics. ``` Sample output: Nodes: ``` $ kubectl top node NAME CPU MEMORY STORAGE TIMESTAMP kubernetes-minion-group-xxxx 76m 1468 Mi 0 Mi Tue, 12 Jul 2016 17:37:00 +0200 kubernetes-minion-group-yyyy 73m 1511 Mi 0 Mi Tue, 12 Jul 2016 17:37:00 +0200 kubernetes-minion-group-zzzz 46m 1506 Mi 0 Mi Tue, 12 Jul 2016 17:37:00 +0200 kubernetes-master 76m 2059 Mi 0 Mi Tue, 12 Jul 2016 17:37:00 +0200 ``` Pods in all namespaces: ``` $ kubectl top pod --all-namespaces NAMESPACE NAME CPU MEMORY STORAGE TIMESTAMP default nginx-1111111111-zzzzz 0m 1 Mi 0 Mi Tue, 12 Jul 2016 17:49:00 +0200 kube-system etcd-server-kubernetes-master 4m 116 Mi 0 Mi Tue, 12 Jul 2016 17:49:00 +0200 kube-system fluentd-cloud-logging-kubernetes-minion-group-xxxx 14m 110 Mi 0 Mi Tue, 12 Jul 2016 17:49:00 +0200 kube-system kube-dns-v18-zzzzz 1m 6 Mi 0 Mi Tue, 12 Jul 2016 17:49:00 +0200 ... ``` Pod with containers: ``` $ kubectl top pod heapster-v1.1.0-1111111111-miail --namespace=kube-system --containers NAMESPACE NAME CPU MEMORY STORAGE TIMESTAMP kube-system heapster-v1.1.0-1111111111-miail 1m 42 Mi 0 Mi Tue, 12 Jul 2016 17:52:00 +0200 heapster 1m 26 Mi 0 Mi eventer 0m 3 Mi 0 Mi heapster-nanny 0m 6 Mi 0 Mi eventer-nanny 0m 6 Mi 0 Mi ``` ref #11382 []() <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.kubernetes.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.kubernetes.io/reviews/kubernetes/kubernetes/28844) <!-- Reviewable:end --> |
||
---|---|---|
.. | ||
admin | ||
api-reference | ||
design | ||
devel | ||
getting-started-guides | ||
images | ||
man/man1 | ||
proposals | ||
user-guide | ||
yaml/kubectl | ||
api.md | ||
OWNERS | ||
README.md | ||
reporting-security-issues.md | ||
roadmap.md | ||
troubleshooting.md | ||
warning.png | ||
whatisk8s.md |
PLEASE NOTE: This document applies to the HEAD of the source tree
If you are using a released version of Kubernetes, you should refer to the docs that go with that version.
The latest release of this document can be found [here](http://releases.k8s.io/release-1.3/docs/README.md).Documentation for other releases can be found at releases.k8s.io.
Kubernetes Documentation: releases.k8s.io/HEAD
-
The User's guide is for anyone who wants to run programs and services on an existing Kubernetes cluster.
-
The Cluster Admin's guide is for anyone setting up a Kubernetes cluster or administering it.
-
The Developer guide is for anyone wanting to write programs that access the Kubernetes API, write plugins or extensions, or modify the core code of Kubernetes.
-
The Kubectl Command Line Interface is a detailed reference on the
kubectl
CLI. -
The API object documentation is a detailed description of all fields found in core API objects.
-
An overview of the Design of Kubernetes
-
There are example files and walkthroughs in the examples folder.
-
If something went wrong, see the troubleshooting document for how to debug. You should also check the known issues for the release you're using.
-
To report a security issue, see Reporting a Security Issue.