-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathkubernetes.yaml
114 lines (114 loc) · 2.31 KB
/
kubernetes.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
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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: ad-operations
namespace: tools
spec:
resources:
requests:
storage: 1Gi
accessModes:
- ReadWriteMany
storageClassName: nfs-storage
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: ad-operations
namespace: tools
spec:
replicas: 1
selector:
matchLabels:
app: ad-operations
template:
metadata:
labels:
app: ad-operations
spec:
containers:
- name: ad-operations
image: ad-operations:latest
securityContext:
runAsUser: 0
imagePullPolicy: IfNotPresent
ports:
- containerPort: 5000
name: web
protocol: TCP
resources:
limits:
cpu: "0.5"
memory: 512Mi
requests:
cpu: "0.25"
memory: 256Mi
livenessProbe:
httpGet:
port: 5000
path: /
initialDelaySeconds: 10
timeoutSeconds: 5
failureThreshold: 10
readinessProbe:
httpGet:
port: 5000
path: /
initialDelaySeconds: 10
volumeMounts:
- mountPath: /etc/localtime
name: localtime
- mountPath: /app/logs
name: ad-operations
subPath: logs
volumes:
- hostPath:
path: /etc/localtime
type: ""
name: localtime
- name: ad-operations
persistentVolumeClaim:
claimName: ad-operations
---
apiVersion: v1
kind: Service
metadata:
name: ad-operations
namespace: tools
labels:
app: ad-operations
spec:
selector:
app: ad-operations
type: ClusterIP
ports:
- port: 5000
name: web
targetPort: 5000
protocol: TCP
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: ad-operations
namespace: tools
labels:
app: ad-operations
spec:
ingressClassName: nginx
rules:
- host: ad-operations.domain.com
http:
paths:
- backend:
service:
name: ad-operations
port:
number: 5000
path: /
pathType: Prefix
tls:
- hosts:
- ad-operations.domain.com
secretName: domain-tls