Skip to content

Instantly share code, notes, and snippets.

@velotiotech
Created September 7, 2020 10:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save velotiotech/5b4297bc2d38b4d993d82541ec6f2685 to your computer and use it in GitHub Desktop.
Save velotiotech/5b4297bc2d38b4d993d82541ec6f2685 to your computer and use it in GitHub Desktop.
kubectl get apiservice
NAME SERVICE AVAILABLE AGE
v1beta1.custom.metrics.k8s.io prometheus/prometheus-adapter True 19m
kubectl get --raw /apis/custom.metrics.k8s.io/v1beta1/namespaces/autoscale-hpa/pods/*/packets_in | jq
{
"kind": "MetricValueList",
"apiVersion": "custom.metrics.k8s.io/v1beta1",
"metadata": {
"selfLink": "/apis/custom.metrics.k8s.io/v1beta1/namespaces/autoscale-hpa/pods/%2A/packets_in"
},
"items": [
{
"describedObject": {
"kind": "Pod",
"namespace": "autoscale-hpa",
"name": "autoscale-tester-878b8c6c8-42gmk",
"apiVersion": "/v1"
},
"metricName": "packets_in",
"timestamp": "2020-07-31T05:59:33Z",
"value": "33",
"selector": null
},
{
"describedObject": {
"kind": "Pod",
"namespace": "autoscale-hpa",
"name": "autoscale-tester-878b8c6c8-hfts8",
"apiVersion": "/v1"
},
"metricName": "packets_in",
"timestamp": "2020-07-31T05:59:33Z",
"value": "11",
"selector": null
},
{
"describedObject": {
"kind": "Pod",
"namespace": "autoscale-hpa",
"name": "autoscale-tester-878b8c6c8-rb9v2",
"apiVersion": "/v1"
},
"metricName": "packets_in",
"timestamp": "2020-07-31T05:59:33Z",
"value": "10",
"selector": null
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment