From 2f8caccfa0d76f245b91e9bf30375ec27a55e47d Mon Sep 17 00:00:00 2001 From: "honza801@ADMIN.META" <krcmar@cesnet.cz> Date: Tue, 14 Dec 2021 13:46:47 +0100 Subject: [PATCH] kustomization namespace default, suggest namePrefix examples nginx-pod-longhorn.yaml, nginx-pod-rbd.yaml --- kustomization.yaml | 5 ++++- nginx-pod-longhorn.yaml | 29 +++++++++++++++++++++++++++++ nginx-pod-rbd.yaml | 30 ++++++++++++++++++++++++++++++ service.yaml | 2 ++ 4 files changed, 65 insertions(+), 1 deletion(-) create mode 100644 nginx-pod-longhorn.yaml create mode 100644 nginx-pod-rbd.yaml diff --git a/kustomization.yaml b/kustomization.yaml index a3fbb36..8f692b4 100644 --- a/kustomization.yaml +++ b/kustomization.yaml @@ -1,6 +1,9 @@ +namespace: default + +#namePrefix: devel- + bases: - nginx.yaml - service.yaml - ingress.yaml -namespace: dexovo diff --git a/nginx-pod-longhorn.yaml b/nginx-pod-longhorn.yaml new file mode 100644 index 0000000..54f7391 --- /dev/null +++ b/nginx-pod-longhorn.yaml @@ -0,0 +1,29 @@ +--- +apiVersion: v1 +kind: Pod +metadata: + name: longhorn-demo-pod +spec: + containers: + - name: web-server + image: nginx + volumeMounts: + - name: mypvc + mountPath: /var/lib/www/html + volumes: + - name: mypvc + persistentVolumeClaim: + claimName: longhorn-pvc + readOnly: false +--- +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: longhorn-pvc +spec: + storageClassName: longhorn + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 5Gi diff --git a/nginx-pod-rbd.yaml b/nginx-pod-rbd.yaml new file mode 100644 index 0000000..5ecedc6 --- /dev/null +++ b/nginx-pod-rbd.yaml @@ -0,0 +1,30 @@ +--- +apiVersion: v1 +kind: Pod +metadata: + name: csi-rbd-demo-pod +spec: + containers: + - name: web-server + image: nginx + volumeMounts: + - name: mypvc + mountPath: /var/lib/www/html + volumes: + - name: mypvc + persistentVolumeClaim: + claimName: rbd-pvc + readOnly: false +--- +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: rbd-pvc +spec: + storageClassName: csi-rbd-sc + accessModes: + - ReadWriteOnce + volumeMode: Filesystem + resources: + requests: + storage: 5Gi diff --git a/service.yaml b/service.yaml index 83598c0..bfe797a 100644 --- a/service.yaml +++ b/service.yaml @@ -4,8 +4,10 @@ kind: Service metadata: name: nginx spec: + #type: NodePort selector: app: nginx ports: - protocol: TCP port: 80 + #nodePort: 30080 -- GitLab