-
Notifications
You must be signed in to change notification settings - Fork 271
/
Copy pathkubernetes.yaml
executable file
·69 lines (69 loc) · 1.38 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
kind: Service
apiVersion: v1
metadata:
name: articles
labels:
app: articles
spec:
selector:
app: articles
ports:
- port: 8080
name: http
type: NodePort
---
kind: Deployment
apiVersion: apps/v1
metadata:
name: articles
labels:
app: articles
spec:
selector:
matchLabels:
app: articles
replicas: 1
template:
metadata:
annotations:
sidecar.istio.io/inject: "true"
labels:
app: articles
version: v1
spec:
containers:
- name: articles
image: articles:1
ports:
- containerPort: 8080
env:
- name: samplescreation
valueFrom:
configMapKeyRef:
name: articles-config
key: samplescreation
- name: inmemory
valueFrom:
configMapKeyRef:
name: articles-config
key: inmemory
livenessProbe:
exec:
command: ["sh", "-c", "curl -s http://localhost:8080/"]
initialDelaySeconds: 20
readinessProbe:
exec:
command: ["sh", "-c", "curl -s http://localhost:8080/health | grep -q articles"]
initialDelaySeconds: 40
restartPolicy: Always
---
kind: ConfigMap
apiVersion: v1
metadata:
name: articles-config
labels:
app: articles
data:
samplescreation: "true"
inmemory: "true"
---