67 lines
1.2 KiB
YAML
67 lines
1.2 KiB
YAML
---
|
|
apiVersion: apps/v1 # for versions before 1.9.0 use apps/v1beta2
|
|
kind: Deployment
|
|
metadata:
|
|
name: almond-cloud
|
|
spec:
|
|
selector:
|
|
matchLabels:
|
|
app: almond-cloud
|
|
strategy:
|
|
type: Recreate
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: almond-cloud
|
|
spec:
|
|
containers:
|
|
- image: cr.lan/almond-cloud
|
|
name: almond-cloud
|
|
imagePullPolicy: Always
|
|
ports:
|
|
- containerPort: 80
|
|
name: http
|
|
volumeMounts:
|
|
- name: almond-cloud-data
|
|
mountPath: /home/almond-cloud
|
|
volumes:
|
|
- name: almond-cloud-data
|
|
persistentVolumeClaim:
|
|
claimName: almond-cloud-data
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: almond-cloud
|
|
spec:
|
|
ports:
|
|
- name: http
|
|
port: 3000
|
|
selector:
|
|
app: almond-cloud
|
|
---
|
|
apiVersion: networking.k8s.io/v1beta1
|
|
kind: Ingress
|
|
metadata:
|
|
name: almond-cloud
|
|
spec:
|
|
rules:
|
|
- host: almond.lan
|
|
http:
|
|
paths:
|
|
- backend:
|
|
serviceName: almond-cloud
|
|
servicePort: http
|
|
---
|
|
apiVersion: v1
|
|
kind: PersistentVolumeClaim
|
|
metadata:
|
|
name: almond-cloud-data
|
|
spec:
|
|
storageClassName: nfs-ssd-ebin01
|
|
accessModes:
|
|
- ReadWriteOnce
|
|
resources:
|
|
requests:
|
|
storage: 6Gi
|
|
|