https://blog.hycorve.com/migrating-from-ingress-networking-k8s-io-v1beta1-to-v1/
73 lines
1.2 KiB
YAML
73 lines
1.2 KiB
YAML
---
|
|
apiVersion: apps/v1 # for versions before 1.9.0 use apps/v1beta2
|
|
kind: Deployment
|
|
metadata:
|
|
name: rompr
|
|
spec:
|
|
selector:
|
|
matchLabels:
|
|
app: rompr
|
|
strategy:
|
|
type: Recreate
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: rompr
|
|
spec:
|
|
containers:
|
|
- image: cr.lan/rompr
|
|
name: rompr
|
|
imagePullPolicy: Always
|
|
ports:
|
|
- containerPort: 80
|
|
name: http
|
|
volumeMounts:
|
|
- name: rompr-data
|
|
mountPath: /rompr
|
|
volumes:
|
|
- name: rompr-data
|
|
persistentVolumeClaim:
|
|
claimName: rompr-data
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: rompr
|
|
spec:
|
|
ports:
|
|
- name: http
|
|
port: 80
|
|
selector:
|
|
app: rompr
|
|
---
|
|
apiVersion: networking.k8s.io/v1
|
|
kind: Ingress
|
|
metadata:
|
|
name: rompr
|
|
annotations:
|
|
kubernetes.io/ingress.class: nginx
|
|
spec:
|
|
rules:
|
|
- host: musik.lan
|
|
http:
|
|
paths:
|
|
- path: /
|
|
pathType: Prefix
|
|
backend:
|
|
service:
|
|
name: rompr
|
|
port:
|
|
name: http
|
|
---
|
|
apiVersion: v1
|
|
kind: PersistentVolumeClaim
|
|
metadata:
|
|
name: rompr-data
|
|
spec:
|
|
storageClassName: nfs-ssd
|
|
accessModes:
|
|
- ReadWriteOnce
|
|
resources:
|
|
requests:
|
|
storage: 6Gi
|
|
|