Skip to content

Instantly share code, notes, and snippets.

@saiumesh535
Created March 5, 2022 15:36
Show Gist options
  • Save saiumesh535/4b2f3a19122a46b15ac90881f7da939f to your computer and use it in GitHub Desktop.
Save saiumesh535/4b2f3a19122a46b15ac90881f7da939f to your computer and use it in GitHub Desktop.
apiVersion: autoscaling/v2beta1
kind: HorizontalPodAutoscaler
metadata:
name: <name_of_the_hpa>
namespace: default
spec:
maxReplicas: 1
minReplicas: 1
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: <name_of_the_deployment>
metrics:
- type: Resource
resource:
name: memory
targetAverageUtilization: 70
- type: Resource
resource:
name: cpu
targetAverageUtilization: 71
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment