forked from DeekshithSN/sample-web-application
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdeployment.yaml
38 lines (38 loc) · 782 Bytes
/
deployment.yaml
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
apiVersion: apps/v1
kind: Deployment
metadata:
name: devops-training
spec:
selector:
matchLabels:
app: devops-training
template:
metadata:
labels:
app: devops-training
spec:
containers:
- name: devops-training
image: deekshithsn/devops-training:docker_tag
command: ["/bin/sh"]
args: ["-c","sh /usr/local/tomcat/bin/startup.sh;while true; do echo hello; sleep 10;done"]
ports:
- name: http
containerPort: 8080
replicas: 2
---
apiVersion: v1
kind: Service
metadata:
name: devops-training-app-service
labels:
app: devops-training
spec:
type: NodePort
ports:
- port: 8080
nodePort: 31884
protocol: TCP
name: http
selector:
app: devops-training