83 lines
1.5 KiB
YAML
83 lines
1.5 KiB
YAML
|
---
|
||
|
apiVersion: v1
|
||
|
kind: PersistentVolumeClaim
|
||
|
metadata:
|
||
|
name: nginx-certs
|
||
|
spec:
|
||
|
accessModes:
|
||
|
- ReadWriteMany
|
||
|
resources:
|
||
|
requests:
|
||
|
storage: 20Mi
|
||
|
storageClassName: rook-cephfs
|
||
|
---
|
||
|
apiVersion: v1
|
||
|
kind: PersistentVolumeClaim
|
||
|
metadata:
|
||
|
name: nginx-webroot
|
||
|
spec:
|
||
|
accessModes:
|
||
|
- ReadWriteMany
|
||
|
resources:
|
||
|
requests:
|
||
|
storage: 20Mi
|
||
|
storageClassName: rook-cephfs
|
||
|
---
|
||
|
apiVersion: v1
|
||
|
kind: Pod
|
||
|
metadata:
|
||
|
name: busybox-storage-helper
|
||
|
spec:
|
||
|
containers:
|
||
|
- name: busybox
|
||
|
image: busybox
|
||
|
args:
|
||
|
- sleep
|
||
|
- "1000000"
|
||
|
volumeMounts:
|
||
|
- mountPath: "/etc/letsencrypt"
|
||
|
name: letsencryptdir
|
||
|
- mountPath: "/www"
|
||
|
name: webroot
|
||
|
volumes:
|
||
|
- name: letsencryptdir
|
||
|
persistentVolumeClaim:
|
||
|
claimName: nginx-certs
|
||
|
- name: webroot
|
||
|
persistentVolumeClaim:
|
||
|
claimName: nginx-webroot
|
||
|
---
|
||
|
apiVersion: v1
|
||
|
kind: Pod
|
||
|
metadata:
|
||
|
name: nginx-port-80
|
||
|
labels:
|
||
|
app: nginx-port-80
|
||
|
spec:
|
||
|
containers:
|
||
|
- name: nginx
|
||
|
image: nginx:1.21-alpine
|
||
|
volumeMounts:
|
||
|
- mountPath: "/etc/letsencrypt"
|
||
|
name: letsencryptdir
|
||
|
- mountPath: "/usr/share/nginx/html"
|
||
|
name: webroot
|
||
|
volumes:
|
||
|
- name: letsencryptdir
|
||
|
persistentVolumeClaim:
|
||
|
claimName: nginx-certs
|
||
|
- name: webroot
|
||
|
persistentVolumeClaim:
|
||
|
claimName: nginx-webroot
|
||
|
---
|
||
|
apiVersion: v1
|
||
|
kind: Service
|
||
|
metadata:
|
||
|
name: svc1
|
||
|
spec:
|
||
|
type: ClusterIP
|
||
|
ports:
|
||
|
- port: 80
|
||
|
selector:
|
||
|
app: nginx-port-80
|