-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathdeploy.yml
89 lines (88 loc) · 1.91 KB
/
deploy.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
85
86
87
88
89
apiVersion: apps/v1
kind: Deployment
metadata:
name: docs
namespace: testnet
labels:
app: docs
spec:
selector:
matchLabels:
app: docs
replicas: 1
strategy:
rollingUpdate:
maxSurge: 25%
maxUnavailable: 25%
type: RollingUpdate
template:
metadata:
labels:
app: docs
spec:
# initContainers:
# Init containers are exactly like regular containers, except:
# - Init containers always run to completion.
# - Each init container must complete successfully before the next one starts.
imagePullSecrets:
- name: regcred
containers:
- name: docs
imagePullPolicy: Always
image: registry.humans.ai/docs:latest
ports:
- containerPort: 80
name: docs
volumeMounts:
- name: localtime
mountPath: /etc/localtime
volumes:
- name: localtime
hostPath:
path: /usr/share/zoneinfo/Europe/Bucharest
restartPolicy: Always
---
apiVersion: v1
kind: Service
metadata:
name: docs
namespace: testnet
spec:
selector:
app: docs
type: ClusterIP
sessionAffinity: None
sessionAffinityConfig:
clientIP:
timeoutSeconds: 10800
ports:
- name: docs
protocol: TCP
port: 80
targetPort: 80
---
# https://kubernetes.io/docs/concepts/services-networking/ingress/#the-ingress-resource
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: docs
namespace: testnet
annotations:
cert-manager.io/cluster-issuer: "letsencrypt"
kubernetes.io/ingress.class: nginx
spec:
tls:
- hosts:
- docs.humans.zone
secretName: docs-testnet
rules:
- host: docs.humans.zone
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: docs
port:
number: 80