Note that Heapster is deprecated (#8827)

* Note that Heapster is deprecated

This notes that Heapster is deprecated, and migrates the relevant
docs to talk about metrics-server or other solutions by default.

* Copyedits and improvements

Signed-off-by: Misty Stanley-Jones <mistyhacks@google.com>

* Address feedback
This commit is contained in:
Solly Ross
2018-06-12 16:27:28 -07:00
committed by Misty Linville
parent 4d7c685007
commit e6fecdf46b
9 changed files with 120 additions and 109 deletions
@@ -20,28 +20,32 @@ but is not allowed to use more CPU than its limit.
Each node in your cluster must have at least 1 cpu.
A few of the steps on this page require that the
[Heapster](https://github.com/kubernetes/heapster) service is running
in your cluster. But if you don't have Heapster running, you can do most
of the steps, and it won't be a problem if you skip the Heapster steps.
A few of the steps on this page require you to run the
[metrics-server](https://github.com/kubernetes-incubator/metrics-server)
service in your cluster. If you don't have metrics-server
running, you can skip those steps.
If you are running minikube, run the following command to enable heapster:
If you are running minikube, run the following command to enable
metrics-server:
```shell
minikube addons enable heapster
minikube addons enable metrics-server
```
To see whether the Heapster service is running, enter this command:
To see whether metrics-server (or another provider of the resource metrics
API, `metrics.k8s.io`) is running, enter this command:
```shell
kubectl get services --namespace=kube-system
kubectl get apiservices
```
If the heapster service is running, it shows in the output:
If the resource metrics API is available, the output will include a
reference to `metrics.k8s.io`.
```shell
NAMESPACE NAME CLUSTER-IP EXTERNAL-IP PORT(S) AGE
kube-system heapster 10.11.240.9 <none> 80/TCP 6d
NAME
v1beta1.metrics.k8s.io
```
{{% /capture %}}
@@ -101,26 +105,18 @@ resources:
cpu: 500m
```
Start a proxy so that you can call the heapster service:
Use `kubectl top` to fetch the metrics for the pod:
```shell
kubectl proxy
```
In another command window, get the CPU usage rate from the heapster service:
```
curl http://localhost:8001/api/v1/namespaces/kube-system/services/heapster/proxy/api/v1/model/namespaces/cpu-example/pods/cpu-demo/metrics/cpu/usage_rate
kubectl top pod memory-demo
```
The output shows that the Pod is using 974 millicpu, which is just a bit less than
the limit of 1 cpu specified in the Pod's configuration file.
```json
{
"timestamp": "2017-06-22T18:48:00Z",
"value": 974
}
```
NAME CPU(cores) MEMORY(bytes)
memory-demo 794m <something>
```
Recall that by setting `-cpu "2"`, you configured the Container to attempt to use 2 cpus.
@@ -19,28 +19,33 @@ but is not allowed to use more memory than its limit.
Each node in your cluster must have at least 300 MiB of memory.
A few of the steps on this page require that the
[Heapster](https://github.com/kubernetes/heapster) service is running
in your cluster. But if you don't have Heapster running, you can do most
of the steps, and it won't be a problem if you skip the Heapster steps.
A few of the steps on this page require you to run the
[metrics-server](https://github.com/kubernetes-incubator/metrics-server)
service in your cluster. If you don't have metrics-server
+running, you can skip those steps.
If you are running minikube, run the following command to enable heapster:
If you are running minikube, run the following command to enable
metrics-server:
```shell
minikube addons enable heapster
minikube addons enable metrics-server
```
To see whether the Heapster service is running, enter this command:
To see whether metrics-server (or another provider of the resource metrics
API, `metrics.k8s.io`) is running, enter this command:
```shell
kubectl get services --namespace=kube-system
kubectl get apiservices
```
If the Heapster service is running, it shows in the output:
If the resource metrics API is available, the output will include a
reference to `metrics.k8s.io`.
```shell
NAMESPACE NAME CLUSTER-IP EXTERNAL-IP PORT(S) AGE
kube-system heapster 10.11.240.9 <none> 80/TCP 6d
NAME
v1beta1.metrics.k8s.io
```
{{% /capture %}}
@@ -103,29 +108,20 @@ resources:
...
```
Start a proxy so that you can call the Heapster service:
Use `kubectl top` to fetch the metrics for the pod:
```shell
kubectl proxy
```
In another command window, get the memory usage from the Heapster service:
```
curl http://localhost:8001/api/v1/namespaces/kube-system/services/heapster/proxy/api/v1/model/namespaces/mem-example/pods/memory-demo/metrics/memory/usage
kubectl top pod memory-demo
```
The output shows that the Pod is using about 162,900,000 bytes of memory, which
is about 150 MiB. This is greater than the Pod's 100 MiB request, but within the
Pod's 200 MiB limit.
```json
{
"timestamp": "2017-06-20T18:54:00Z",
"value": 162856960
}
```
NAME CPU(cores) MEMORY(bytes)
memory-demo <something> 162856960
```
Delete your Pod: