-
Notifications
You must be signed in to change notification settings - Fork 0
/
nginx-cluster-multi-resource-manifest.yml
84 lines (82 loc) · 2.04 KB
/
nginx-cluster-multi-resource-manifest.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx-cluster-deployment
namespace: doridoridoriand
spec:
replicas: 120
selector:
matchLabels:
app: nginx-cluster-app
template:
metadata:
namespace: doridoridoriand
labels:
app: nginx-cluster-app
spec:
containers:
- name: nginx-cluster-container
image: nginx:1.17.5
resources:
requests:
cpu: 1000m
memory: 2000Mi
ports:
- containerPort: 80
---
apiVersion: v1
kind: Service
metadata:
name: nginx-cluster-service
namespace: doridoridoriand
spec:
type: LoadBalancer
ports:
- name: "http-port"
protocol: "TCP"
port: 80
targetPort: 80
selector:
app: nginx-cluster-app
---
apiVersion: v1
kind: Service
metadata:
name: nginx-cluster-alb-service
namespace: doridoridoriand
spec:
type: NodePort
ports:
- name: "http-port"
protocol: "TCP"
port: 80
targetPort: 80
selector:
app: nginx-cluster-app
---
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: nginx-cluster-ingress
namespace: doridoridoriand
annotations:
kubernetes.io/ingress.class: alb
alb.ingress.kubernetes.io/scheme: internet-facing
alb.ingress.kubernetes.io/inbound-cidrs: 0.0.0.0/0
alb.ingress.kubernetes.io/load-balancer-attributes: idle_timeout.timeout_seconds=1
alb.ingress.kubernetes.io/target-group-attributes: deregistration_delay.timeout_seconds=1
alb.ingress.kubernetes.io/target-type: ip
alb.ingress.kubernetes.io/subnets: subnet-xxxxxxxxxxxxxxxxx,subnet-xxxxxxxxxxxxxxxxx,subnet-xxxxxxxxxxxxxxxxx
alb.ingress.kubernetes.io/tags: env=dev,app=nginx-cluster
alb.ingress.kubernetes.io/healthcheck-path: /
alb.ingress.kubernetes.io/healthcheck-timeout-seconds: '2'
alb.ingress.kubernetes.io/healthcheck-interval-seconds: '5'
spec:
rules:
- http:
paths:
- path: /*
backend:
serviceName: nginx-cluster-alb-service
servicePort: 80