-
Notifications
You must be signed in to change notification settings - Fork 1
/
k8s.yaml
45 lines (45 loc) · 934 Bytes
/
k8s.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
43
44
45
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: treesql
spec:
selector:
matchLabels:
app: treesql # has to match .spec.template.metadata.labels
serviceName: "treesql"
replicas: 1 # by default is 1
template:
metadata:
labels:
app: treesql # has to match .spec.selector.matchLabels
spec:
containers:
- name: treesql
image: vilterp/treesql
ports:
- containerPort: 9000
name: web
volumeMounts:
- name: data
mountPath: /data
volumeClaimTemplates:
- metadata:
name: data
spec:
# storageClassName: "my-storage-class"
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 10G
---
apiVersion: v1
kind: Service
metadata:
name: treesql
spec:
type: LoadBalancer
ports:
- port: 9000
selector:
app: treesql