Skip to content

Commit de0a1ea

Browse files
authored
Create deploy-k8s.yml
1 parent 5635dac commit de0a1ea

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

deploy-k8s.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
apiVersion: apps/v1
2+
kind: Deployment
3+
metadata:
4+
name: webapp
5+
spec:
6+
selector:
7+
matchLabels:
8+
app: myapp
9+
template:
10+
metadata:
11+
labels:
12+
app: myapp
13+
spec:
14+
containers:
15+
- name: myapp
16+
image: mylandmarktech/maven-web-app
17+
ports:
18+
- containerPort: 8080
19+
---
20+
apiVersion: v1
21+
kind: Service
22+
metadata:
23+
name: myapp
24+
spec:
25+
type: NodePort
26+
selector:
27+
app: myapp
28+
ports:
29+
- port: 80
30+
targetPort: 8080
31+
nodePort: 30300

0 commit comments

Comments
 (0)