Merge pull request #193 from YaoZengzeng/faq

faq for namespace prefixed metrics access
This commit is contained in:
Sergiusz Urbaniak 2019-05-14 13:33:18 +02:00 committed by GitHub
commit f0ec22a3f5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -185,3 +185,9 @@ queries. The adapter only considers metrics with datapoints in the window
`[now-discoveryInterval, now]` (in order to only capture metrics that are `[now-discoveryInterval, now]` (in order to only capture metrics that are
still present), so make sure that your discovery interval is at least as still present), so make sure that your discovery interval is at least as
large as your collection interval. large as your collection interval.
### I get errors when query namespace prefixed metrics?
I have namespace prefixed metrics like `{ "name": "namespaces/node_memory_PageTables_bytes", "singularName": "", "namespaced": false, "kind": "MetricValueList", "verbs": [ "get" ] }`, but I get error `Error from server (InternalError): Internal error occurred: unable to list matching resources` when access with `kubectl get --raw /apis/custom.metrics.k8s.io/v1beta1/namespaces/*/node_memory_PageTables_bytes` .
Actually namespace prefixed metrics are special, we should access them with `kubectl get --raw /apis/custom.metrics.k8s.io/v1beta1/namespaces/*/metrics/node_memory_PageTables_bytes`.