diff --git a/certificates/certbot-homemade.yaml b/certificates/certbot-homemade.yaml new file mode 100644 index 0000000..9da0c13 --- /dev/null +++ b/certificates/certbot-homemade.yaml @@ -0,0 +1,82 @@ +--- +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