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:
committed by
Misty Linville
parent
4d7c685007
commit
e6fecdf46b
@@ -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:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user