Skip to content

Instantly share code, notes, and snippets.

@alok87
Last active November 23, 2019 16:05
Show Gist options
  • Save alok87/bf737172b5fd9e3ed0a90e7ef575c290 to your computer and use it in GitHub Desktop.
Save alok87/bf737172b5fd9e3ed0a90e7ef575c290 to your computer and use it in GitHub Desktop.
apiVersion: autoscaling/v1
kind: HorizontalPodAutoscaler
metadata:
name: {{ name }}
namespace: {{ namespace }}
spec:
metrics:
- type: Object
object:
metricName: {{ hpa.metrics_metric_name }}
target:
kind: Service
name: {{ hpa.metrics_target_service }}
targetValue: {{ hpa.metrics_target_value }}
scaleTargetRef:
apiVersion: extensions/v1beta1
kind: {{ kind }}
name: {{ name }}
maxReplicas: {{ hpa.max_replicas }}
minReplicas: {{ hpa.min_replicas }}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment