-
Notifications
You must be signed in to change notification settings - Fork 0
/
example.yaml
57 lines (57 loc) · 1.46 KB
/
example.yaml
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
apiVersion: apps/v1
kind: Deployment
metadata:
name: echo-server
namespace: default
labels:
app: echo-server
spec:
selector:
matchLabels:
app: echo-server
replicas: 1
template:
metadata:
labels:
app: echo-server
spec:
containers:
- name: main
image: k8s.gcr.io/echoserver:1.6
ports:
- containerPort: 8080
resources:
requests:
cpu: 100m
memory: 100Mi
limits:
cpu: 100m
memory: 100Mi
---
apiVersion: v1
kind: Service
metadata:
name: echo-server
namespace: default
annotations:
# external-dns.alpha.kubernetes.io/hostname: "choilab.xyz" # aws route53 hostzone
service.beta.kubernetes.io/aws-load-balancer-nlb-target-type: ip
service.beta.kubernetes.io/aws-load-balancer-scheme: internet-facing
service.beta.kubernetes.io/aws-load-balancer-healthcheck-port: "8080"
# service.beta.kubernetes.io/aws-load-balancer-ssl-ports: "https"
# service.beta.kubernetes.io/aws-load-balancer-ssl-cert: "arn:aws:acm:ap-northeast-2:467606240901:certificate/248292f9-a31b-46b7-be91-b1e23a2b9a70" # aws acm id
service.beta.kubernetes.io/aws-load-balancer-backend-protocol: "http"
spec:
loadBalancerClass: service.k8s.aws/nlb
type: LoadBalancer
selector:
app: echo-server
ports:
- name: http
protocol: TCP
port: 80
targetPort: 8080
- name: https
protocol: TCP
port: 443
targetPort: 8080