-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathk8s-testserver-openshift.yaml
108 lines (104 loc) · 2.05 KB
/
k8s-testserver-openshift.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
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: k8s-testserver-deployment
namespace: miaow-prod
labels:
app: k8s-testserver-demo
annotations:
authors: isas-fsd
spec:
replicas: 2
selector:
matchLabels:
app: k8s-testserver-demo
strategy:
type: RollingUpdate
template:
metadata:
labels:
app: k8s-testserver-demo
version: 0.0.1
spec:
containers:
- image: 'epflsi/k8s-testserver:latest'
imagePullPolicy: Always
name: k8s-testserver-demo
ports:
- containerPort: 3000
protocol: TCP
resources:
limits:
cpu: 150m
memory: 150Mi
requests:
cpu: 50m
memory: 50Mi
envFrom:
- secretRef:
name: k8ssecret
readinessProbe:
httpGet:
path: /
port: 3000
initialDelaySeconds: 15
timeoutSeconds: 1
livenessProbe:
httpGet:
path: /
port: 3000
initialDelaySeconds: 15
timeoutSeconds: 1
restartPolicy: Always
---
apiVersion: v1
kind: Service
metadata:
name: k8s-testserver-service
namespace: miaow-prod
labels:
app: k8s-testserver-demo
annotations:
authors: isas-fsd
spec:
ports:
- name: "80"
port: 80
protocol: TCP
targetPort: 3000
selector:
app: k8s-testserver-demo
type: ClusterIP
---
apiVersion: route.openshift.io/v1
kind: Route
metadata:
name: k8s-testserver-service
namespace: miaow-prod
labels:
app: k8s-testserver-demo
annotations:
authors: isas-fsd
spec:
host: k8s-demo.128.178.222.83.nip.io
port:
targetPort: "80"
tls:
termination: edge
to:
kind: Service
name: k8s-testserver-service
weight: 100
wildcardPolicy: None
---
apiVersion: v1
kind: Secret
metadata:
name: k8ssecret
namespace: miaow-prod
stringData:
K8SSECRET: monsupersecret
password: miaowmiaowmiaow
username: lechat
type: Opaque