Skip to content

Commit 5f9d392

Browse files
committed
feat(k8s): deployment and service template
1 parent e07a7e0 commit 5f9d392

File tree

2 files changed

+37
-0
lines changed

2 files changed

+37
-0
lines changed

app/deployment.yaml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
apiVersion: apps/v1beta1
2+
kind: Deployment
3+
metadata:
4+
name: training-deployment
5+
spec:
6+
replicas: 1
7+
selector:
8+
matchLabels:
9+
app: training
10+
template:
11+
metadata:
12+
labels:
13+
app: training
14+
spec:
15+
containers:
16+
- name: training
17+
image: training:v1
18+
imagePullPolicy: IfNotPresent
19+
livenessProbe:
20+
httpGet:
21+
path: /healthz
22+
port: 3000
23+
initialDelaySeconds: 30
24+
timeoutSeconds: 1
25+
ports:
26+
- containerPort: 3000

app/service.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
kind: Service
2+
apiVersion: v1
3+
metadata:
4+
name: training-service
5+
spec:
6+
selector:
7+
app: training
8+
ports:
9+
- port: 3000
10+
protocol: TCP
11+
type: NodePort

0 commit comments

Comments
 (0)