SHARE
TWEET

Untitled

a guest Aug 20th, 2019 70 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $ kubectl get --raw "/apis/custom.metrics.k8s.io/v1beta1/namespaces/nginx-ingress/ingresses/petclinic/nginx_ingress_controller_requests" | jq .
  2.      
  3. {
  4.   "kind": "MetricValueList",
  5.   "apiVersion": "custom.metrics.k8s.io/v1beta1",
  6.   "metadata": {
  7.     "selfLink": "/apis/custom.metrics.k8s.io/v1beta1/namespaces/nginx-ingress/ingresses/petclinic-staging/nginx_ingress_controller_requests"
  8.   },
  9.   "items": [
  10.     {
  11.       "describedObject": {
  12.         "kind": "Ingress",
  13.         "namespace": "nginx-ingress",
  14.         "name": "petclinic",
  15.         "apiVersion": "extensions/v1beta1"
  16.       },
  17.       "metricName": "nginx_ingress_controller_requests",
  18.       "timestamp": "2019-08-20T12:56:50Z",
  19.       "value": "11"
  20.     }
  21.   ]
  22. }
  23.      
  24. apiVersion: autoscaling/v2beta1
  25. kind: HorizontalPodAutoscaler
  26. metadata:
  27.   name: petclinic
  28.   namespace: petclinic
  29. spec:
  30.   scaleTargetRef:
  31.     apiVersion: apps/v1
  32.     kind: Deployment
  33.     name: petclinic-production
  34.   minReplicas: 1
  35.   maxReplicas: 10
  36.   metrics:
  37.   - type: Object
  38.     object:
  39.       metricName: nginx_ingress_controller_requests
  40.       target:
  41.         apiVersion: extensions/v1beta1
  42.         kind: Ingress
  43.         name: petclinic
  44.       targetValue: 10k
  45.      
  46. annotations:
  47.       autoscaling.alpha.kubernetes.io/conditions: '[{"type":"AbleToScale","status":"True","lastTransitionTime":"2019-08-19T18:43:42Z","reason":"SucceededGetScale","message":"the
  48.         HPA controller was able to get the target''s current scale"},{"type":"ScalingActive","status":"False","lastTransitionTime":"2019-08-19T18:55:26Z","reason":"FailedGetObjectMetric","message":"the
  49.         HPA was unable to compute the replica count: unable to get metric nginx_ingress_controller_requests:
  50.         Ingress on petclinic petclinic/unable to fetch metrics
  51.         from custom metrics API: the server could not find the metric nginx_ingress_controller_requests
  52.         for ingresses.extensions petclinic"},{"type":"ScalingLimited","status":"False","lastTransitionTime":"2019-08-19T18:43:42Z","reason":"DesiredWithinRange","message":"the
  53.         desired count is within the acceptable range"}]'
  54.       autoscaling.alpha.kubernetes.io/current-metrics: '[{"type":""},{"type":"Resource","resource":{"name":"cpu","currentAverageUtilization":1,"currentAverageValue":"10m"}}]'
  55.       autoscaling.alpha.kubernetes.io/metrics: '[{"type":"Object","object":{"target":{"kind":"Ingress","name":"petclinic","apiVersion":"extensions/v1beta1"},"metricName":"nginx_ingress_controller_requests","targetValue":"10k"}}]'
  56.       kubectl.kubernetes.io/last-applied-configuration: |
  57.         {"apiVersion":"autoscaling/v2beta1","kind":"HorizontalPodAutoscaler","metadata":{"annotations":{},"name":"petclinic","namespace":"petclinic"},"spec":{"maxReplicas":10,"metrics":[{"object":{"metricName":"nginx_ingress_controller_requests","target":{"apiVersion":"extensions/v1beta1","kind":"Ingress","name":"petclinic-staging"},"targetValue":"10k"},"type":"Object"}],"minReplicas":1,"scaleTargetRef":{"apiVersion":"apps/v1","kind":"Deployment","name":"petclinic"}}}
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top