Jump to content

Kubernetes help


Recommended Posts

Posted
1 hour ago, hunkyfunky2 said:

I can help if you are stuck, we did similar thing 

Post here baaa or post it to GitHub and share the link 

Posted
kind: HorizontalPodAutoscaler
apiVersion: autoscaling/v2beta2
metadata:
  name: request-hpa
spec:
  scaleTargetRef:
    apiVersion: apps/v1
    kind: Deployment
    name: app-deployment
  minReplicas: {{ .Values.hpa.minReplicas }}
  maxReplicas: {{ .Values.hpa.maxReplicas }}
  metrics:
  - type: External
    external:
      metric:
        name: requests_avg
      target:
        type: Value
        value: {{ .Values.hpa.targetValue }}

Above HPA , there is nothing special about it. Actual part is to expose the metrics to Prometheus - it depends on application - for ex: if it is Java/ SpringBoot then you can use io.micrometer.core.instrument.Metrics.counter. 

Whats left is prometheus adapter configuration - see documentation at https://github.com/kubernetes-sigs/prometheus-adapter and walk through - it has examples of how to add "rules". 
https://github.com/kubernetes-sigs/prometheus-adapter/blob/master/docs/walkthrough.md

  • Upvote 1
Posted

I can post the rules section we used - but it is not much different from what is there in the documentation link I posted. 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...