Skip to content

Commit 101030c

Browse files
authored
Create kubedeploy.yml
1 parent 42e9299 commit 101030c

1 file changed

Lines changed: 66 additions & 0 deletions

File tree

kubedeploy.yml

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
---
2+
apiVersion: apps/v1
3+
kind: Deployment
4+
metadata:
5+
labels:
6+
app: mongodb
7+
name: mongodb
8+
spec:
9+
replicas: 1
10+
selector:
11+
matchLabels:
12+
app: mongodb
13+
template:
14+
metadata:
15+
creationTimestamp: null
16+
labels:
17+
app: mongodb
18+
spec:
19+
containers:
20+
- image: lerndevops/samples:mongodb
21+
name: mongo
22+
23+
---
24+
apiVersion: v1
25+
kind: Service
26+
metadata:
27+
name: mongo
28+
spec:
29+
type: ClusterIP
30+
ports:
31+
- port: 27017
32+
targetPort: 27017
33+
selector:
34+
app: mongodb
35+
36+
---
37+
apiVersion: apps/v1
38+
kind: Deployment
39+
metadata:
40+
name: springboot-app
41+
spec:
42+
replicas: 2
43+
selector:
44+
matchLabels:
45+
app: myapp
46+
template:
47+
metadata:
48+
labels:
49+
app: myapp
50+
spec:
51+
containers:
52+
- image: lerndevops/samples:springboot-app
53+
name: springboot-app
54+
55+
---
56+
apiVersion: v1
57+
kind: Service
58+
metadata:
59+
name: springboot-app-svc
60+
spec:
61+
type: NodePort
62+
ports:
63+
- port: 80
64+
targetPort: 8080
65+
selector:
66+
app: myapp

0 commit comments

Comments
 (0)