Last active 1726979753

ConfigMap.yaml Raw
1apiVersion: v1
2kind: ConfigMap
3metadata:
4 name: <NAME>-config
5data:
6 VAR: "value"
Ingress.yaml Raw
1apiVersion: networking.k8s.io/v1
2kind: Ingress
3metadata:
4 name: <NAME>
5spec:
6 ingressClassName: nginx
7 rules:
8 - host: example.com
9 http:
10 paths:
11 - pathType: Prefix
12 backend:
13 service:
14 name: <NAME>
15 port:
16 number: 3003
17 path: /
18 # This section is only required if TLS is to be enabled for the Ingress
19 tls:
20 - hosts:
21 - example.com
22 secretName: <TLSSECRETNAME>
23
24
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