Add 17th practice

This commit is contained in:
Pavel Selivanov
2021-11-25 00:32:54 +03:00
parent 6198d94dee
commit 207030b49b
15 changed files with 741 additions and 0 deletions
@@ -0,0 +1,24 @@
apiVersion: apps/v1
kind: Deployment
metadata:
creationTimestamp: null
labels:
app: hpa-v2-test
name: hpa-v2-test
spec:
replicas: 1
selector:
matchLabels:
app: hpa-v2-test
strategy: {}
template:
metadata:
creationTimestamp: null
labels:
app: hpa-v2-test
spec:
containers:
- image: nginx:1.13
name: nginx
resources: {}
status: {}
@@ -0,0 +1,25 @@
---
apiVersion: autoscaling/v2beta2
kind: HorizontalPodAutoscaler
metadata:
name: hpa-v2-test
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: hpa-v2-test
minReplicas: 1
maxReplicas: 10
metrics:
- type: Object
object:
metric:
name: nginx_ingress_controller_requests_per_second
describedObject:
apiVersion: networking.k8s.io/v1
kind: Ingress
name: hpa-v2-test
target:
type: AverageValue
averageValue: 10
...
@@ -0,0 +1,18 @@
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: hpa-v2-test
spec:
rules:
- host: hpa-v2-test.<External Ingress IP>.nip.io
http:
paths:
- pathType: Prefix
path: /
backend:
service:
name: hpa-v2-test
port:
number: 80
...