forked from gaby/devops-exercises
-
Notifications
You must be signed in to change notification settings - Fork 0
/
helloworld.yml
65 lines (65 loc) · 1.25 KB
/
helloworld.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
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: hello-blue-whale
spec:
replicas: 3
selector:
matchLabels:
app: hello-world-app
version: blue
template:
metadata:
name: hello-blue-whale-pod
labels:
app: hello-world-app
version: blue
spec:
containers:
- name: hello-whale-container
image: abregman2/helloworld:latest
imagePullPolicy: Always
ports:
- containerPort: 80
- containerPort: 443
---
apiVersion: v1
kind: Service
metadata:
name: hello-world
labels:
app: hello-world-app
spec:
ports:
- port: 80
targetPort: 80
protocol: TCP
name: http
selector:
app: hello-world-app
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: example-ingress
annotations:
cert-manager.io/cluster-issuer: selfsigned-issuer
nginx.ingress.kubernetes.io/rewrite-target: /
kubernetes.io/ingress.class: nginx
spec:
tls:
- hosts:
- hello-world.app
secretName: shhh
rules:
- host: hello-world.app
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: hello-world
port:
number: 80