-
Notifications
You must be signed in to change notification settings - Fork 71
/
deploy.yml
53 lines (53 loc) · 1.34 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
apiVersion: v1
kind: List
items:
- apiVersion: v1
kind: Service
metadata:
labels:
app: hello-java-spring-boot
app.kubernetes.io/component: hello-java-spring-boot
app.kubernetes.io/instance: hello-java-spring-boot
name: hello-java-spring-boot
spec:
ports:
- name: 8080-tcp
port: 8080
protocol: TCP
targetPort: 8080
selector:
deployment: hello-java-spring-boot
sessionAffinity: None
type: ClusterIP
- apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: hello-java-spring-boot
app.kubernetes.io/component: hello-java-spring-boot
app.kubernetes.io/instance: hello-java-spring-boot
name: hello-java-spring-boot
spec:
replicas: 1
selector:
matchLabels:
app: hello-java-spring-boot
template:
metadata:
labels:
app: hello-java-spring-boot
name: hello-java-spring-boot
spec:
containers:
- image: monodot/hello-java-spring-boot:latest
imagePullPolicy: IfNotPresent
name: hello-java-spring-boot
env:
- name: FAVOURITE_CHEESE
valueFrom:
configMapKeyRef: my-configmap
key: thefavourite.cheese
ports:
- containerPort: 8080
protocol: TCP
restartPolicy: Always