Last active 1726979753

Revision 5d31cf3f9af11201694a2586d2cfae5034909b47

Service.yaml Raw
1apiVersion: v1
2kind: Service
3metadata:
4 name: <NAME>-svc
5 labels:
6 app: <NAME>
7spec:
8 ports:
9 - port: 3003
10 name: <PORT NAME>
11 clusterIP: None
12 selector:
13 app: <NAME>
StatefulSet.yaml Raw
1apiVersion: apps/v1
2kind: StatefulSet
3metadata:
4 name: <NAME>
5 labels:
6 app: <NAME>
7spec:
8 serviceName: <NAME>
9 minReadySeconds: 10
10 replicas: 1
11 selector:
12 matchLabels:
13 app: <NAME>
14 template:
15 metadata:
16 labels:
17 app: <NAME>
18 spec:
19 volumes:
20 - name: <NAME>-vol
21 persistentVolumeClaim:
22 claimName: <NAME>-pvc
23 containers:
24 - image: "<IMAGE>"
25 #imagePullPolicy: Never
26 name: app
27 volumeMounts:
28 - mountPath: /path
29 name: <NAME>-vol
30 ports:
31 - containerPort: 3003
32 # hostPort: 8085
33
storage.yaml Raw
1apiVersion: v1
2kind: PersistentVolume
3metadata:
4 name: <NAME>-pv
5spec:
6 capacity:
7 storage: 100Mi
8 volumeMode: Filesystem
9 accessModes:
10 - ReadWriteOnce
11 persistentVolumeReclaimPolicy: Retain
12 storageClassName: <STORAGECLASSNAME>
13 local:
14 path: /path/to/data/on/host
15 nodeAffinity:
16 required:
17 nodeSelectorTerms:
18 - matchExpressions:
19 - key: kubernetes.io/hostname
20 operator: In
21 values:
22 - <HOSTNAME>
23---
24apiVersion: v1
25kind: PersistentVolumeClaim
26metadata:
27 name: <NAME>-pvc
28spec:
29 storageClassName: <STORAGECLASSNAME>
30 accessModes:
31 - ReadWriteOnce
32 resources:
33 requests:
34 storage: 100Mi
35