-
Notifications
You must be signed in to change notification settings - Fork 149
/
all-protos-nginx.yml
54 lines (53 loc) · 1.19 KB
/
all-protos-nginx.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
---
kind: Service
apiVersion: v1
metadata:
name: http-lb
annotations:
# service.beta.kubernetes.io/do-loadbalancer-protocol can also be omitted since it defaults to "tcp".
service.beta.kubernetes.io/do-loadbalancer-protocol: "tcp"
service.beta.kubernetes.io/do-loadbalancer-http-ports: "80"
service.beta.kubernetes.io/do-loadbalancer-https-ports: "443"
service.beta.kubernetes.io/do-loadbalancer-certificate-id: "c019bbf4-cad2-4884-8a20-410ddad7f54a"
spec:
type: LoadBalancer
selector:
app: nginx-example
ports:
- name: ssh
protocol: TCP
port: 22
targetPort: 22
- name: http
protocol: TCP
port: 80
targetPort: 80
- name: https
protocol: TCP
port: 443
targetPort: 443
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx-example
spec:
replicas: 2
selector:
matchLabels:
app: nginx-example
template:
metadata:
labels:
app: nginx-example
spec:
containers:
- name: nginx
image: nginx
ports:
- containerPort: 22
protocol: TCP
- containerPort: 80
protocol: TCP
- containerPort: 443
protocol: TCP