forked from jenkins-docs/simple-java-maven-app
-
Notifications
You must be signed in to change notification settings - Fork 1
/
deployment.yaml
42 lines (42 loc) · 823 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
39
40
41
42
apiVersion: apps/v1
kind: Deployment
metadata:
name: example-app
labels:
k8s-app: java-maven-app
spec:
selector:
matchLabels:
k8s-app: java-maven-app
template:
metadata:
labels:
k8s-app: java-maven-app
spec:
containers:
- name: example-app
image: {{ image }}
resources:
limits:
cpu: 100m
memory: 300Mi
requests:
cpu: 50m
memory: 200Mi
command: [ 'sh','-c','java -Xmx128m -jar /opt/*.jar && tail -f /var/log/lastlog' ]
ports:
- containerPort: 8080
protocol: TCP
---
apiVersion: v1
kind: Service
metadata:
name: example-app
labels:
k8s-app: java-maven-app
spec:
selector:
k8s-app: java-maven-app
ports:
- port: 8080
type: NodePort