-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathservices.yaml
More file actions
86 lines (85 loc) · 2.29 KB
/
Copy pathservices.yaml
File metadata and controls
86 lines (85 loc) · 2.29 KB
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
85
86
apiVersion: apps/v1
kind: Deployment
metadata:
name: aws-playground-app
spec:
replicas: 2
selector:
matchLabels:
app: aws-playground-app
template:
metadata:
name: aws-playground-app
labels:
app: aws-playground-app
spec:
containers:
- image: ${ECR_REPOSITORY}/app:latest
imagePullPolicy: Always
name: aws-playground-app
readinessProbe:
httpGet:
path: /hello
port: 8080
failureThreshold: 20
periodSeconds: 30
env:
- name: TEST
value: VALUE
ports:
- name: http
containerPort: 8080
resources:
limits:
cpu: 1.0
memory: 200Mi
requests:
cpu: 0.5
memory: 200Mi
---
apiVersion: v1
kind: Service
metadata:
name: service-aws-playground-app
spec:
ports:
- port: 8080
targetPort: 8080
protocol: TCP
type: NodePort
selector:
app: aws-playground-app
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: ingress-aws-playground
labels:
app: aws-playground-app
annotations:
# Ingress Core Settings
alb.ingress.kubernetes.io/scheme: internet-facing
alb.ingress.kubernetes.io/target-type: ip
# https://docs.aws.amazon.com/elasticloadbalancing/latest/application/load-balancer-target-groups.html#target-group-attributes
alb.ingress.kubernetes.io/target-group-attributes: stickiness.enabled=true,stickiness.type=app_cookie,stickiness.app_cookie.cookie_name=mycookie
# Health Check Settings
alb.ingress.kubernetes.io/healthcheck-protocol: HTTP
alb.ingress.kubernetes.io/healthcheck-port: traffic-port
alb.ingress.kubernetes.io/healthcheck-path: /hello
alb.ingress.kubernetes.io/healthcheck-interval-seconds: '15'
alb.ingress.kubernetes.io/healthcheck-timeout-seconds: '5'
alb.ingress.kubernetes.io/success-codes: '200'
alb.ingress.kubernetes.io/healthy-threshold-count: '2'
alb.ingress.kubernetes.io/unhealthy-threshold-count: '2'
spec:
ingressClassName: alb
rules:
- http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: service-aws-playground-app
port:
number: 8080