Skip to content

Commit

Permalink
horizontalpodautoscaling - hpa
Browse files Browse the repository at this point in the history
  • Loading branch information
wardviaene committed Nov 28, 2016
1 parent 2522fbc commit 31486e5
Showing 1 changed file with 47 additions and 0 deletions.
47 changes: 47 additions & 0 deletions autoscaling/hpa-example.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: hpa-example
spec:
replicas: 3
template:
metadata:
labels:
app: hpa-example
spec:
containers:
- name: hpa-example
image: gcr.io/google_containers/hpa-example
ports:
- name: http-port
containerPort: 80
resources:
requests:
cpu: 200m
---
apiVersion: v1
kind: Service
metadata:
name: hpa-example
spec:
ports:
- port: 31001
nodePort: 31001
targetPort: http-port
protocol: TCP
selector:
app: hpa-example
type: NodePort
---
apiVersion: autoscaling/v1
kind: HorizontalPodAutoscaler
metadata:
name: hpa-example-autoscaler
spec:
scaleTargetRef:
apiVersion: extensions/v1beta1
kind: Deployment
name: hpa-example
minReplicas: 1
maxReplicas: 10
targetCPUUtilizationPercentage: 50

0 comments on commit 31486e5

Please sign in to comment.