mirror of
https://github.com/clearlinux/cloud-native-setup.git
synced 2026-09-06 05:41:40 +00:00
With kubelet service file fixed and correct args set in metrics-server-deployment.yaml, autoscale seems to be working reliably. Fixes: #5 Signed-off-by: Saikrishna Edupuganti <saikrishna.edupuganti@intel.com>
55 lines
967 B
YAML
55 lines
967 B
YAML
---
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
labels:
|
|
run: php-apache-test
|
|
name: php-apache-test
|
|
spec:
|
|
selector:
|
|
matchLabels:
|
|
run: php-apache-test
|
|
template:
|
|
metadata:
|
|
labels:
|
|
run: php-apache-test
|
|
spec:
|
|
containers:
|
|
- image: k8s.gcr.io/hpa-example
|
|
name: php-apache-test
|
|
ports:
|
|
- containerPort: 80
|
|
protocol: TCP
|
|
resources:
|
|
requests:
|
|
cpu: 200m
|
|
restartPolicy: Always
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: php-apache-test
|
|
spec:
|
|
ports:
|
|
- port: 80
|
|
protocol: TCP
|
|
targetPort: 80
|
|
selector:
|
|
run: php-apache-test
|
|
sessionAffinity: None
|
|
type: ClusterIP
|
|
---
|
|
apiVersion: autoscaling/v1
|
|
kind: HorizontalPodAutoscaler
|
|
metadata:
|
|
name: php-apache-test
|
|
spec:
|
|
maxReplicas: 10
|
|
minReplicas: 1
|
|
scaleTargetRef:
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
name: php-apache-test
|
|
targetCPUUtilizationPercentage: 50
|
|
|