apps/yarr/yarr.yaml (view raw)
1apiVersion: apps/v1
2kind: Deployment
3metadata:
4 name: yarr
5 labels:
6 app: yarr
7spec:
8 selector:
9 matchLabels:
10 app: yarr
11 template:
12 metadata:
13 labels:
14 app: yarr
15 spec:
16 containers:
17 - name: yarr
18 image: sini:5000/yarr:latest
19 imagePullPolicy: Always
20 ports:
21 - name: http
22 containerPort: 7070
23 args:
24 - -addr
25 - 0.0.0.0:7070
26 volumeMounts:
27 - name: db
28 mountPath: /data
29 volumes:
30 - name: db
31 persistentVolumeClaim:
32 claimName: yarr-db
33
34---
35apiVersion: v1
36kind: Service
37metadata:
38 name: yarr
39spec:
40 selector:
41 app: yarr
42 ports:
43 - name: http
44 port: 80
45 targetPort: 7070
46---
47apiVersion: v1
48kind: PersistentVolumeClaim
49metadata:
50 name: yarr-db
51spec:
52 storageClassName: local-path
53 accessModes:
54 - ReadWriteOnce
55 resources:
56 requests:
57 storage: 200Mi