Skip to content

Commit 99469e5

Browse files
committed
K8s app with NodePort service example.
1 parent b0c4da6 commit 99469e5

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
apiVersion: v1
2+
kind: Service
3+
metadata:
4+
name: covid-19-bangladesh-nodeport-service
5+
spec:
6+
type: NodePort
7+
ports:
8+
- port: 8080
9+
nodePort: 30001
10+
selector:
11+
app: covid-19-bangladesh
12+
13+
---
14+
15+
apiVersion: apps/v1
16+
kind: Deployment
17+
metadata:
18+
name: covid-19-bangladesh-nodeport-deployment
19+
spec:
20+
replicas: 3
21+
selector:
22+
matchLabels:
23+
app: covid-19-bangladesh
24+
template:
25+
metadata:
26+
labels:
27+
app: covid-19-bangladesh
28+
spec:
29+
containers:
30+
- name: covid-19-bangladesh
31+
image: mmahmood/covid-19-bangladesh:latest
32+
ports:
33+
- containerPort: 8080
34+
---
35+
36+
37+

0 commit comments

Comments
 (0)