mirror of
https://github.com/slurm-personal/school-dev-k8s.git
synced 2026-06-27 13:50:24 +00:00
Add 17th practice
This commit is contained in:
@@ -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
|
||||
...
|
||||
Reference in New Issue
Block a user