From bf9703627a4bedd9c7b00ae35289d5a4725aae5a Mon Sep 17 00:00:00 2001 From: Sabbir Ahmed Shameem <145862004+SAShameem@users.noreply.github.com> Date: Tue, 7 May 2024 22:45:31 +0600 Subject: [PATCH] Create web.yaml --- content/bn/examples/application/web/web.yaml | 46 ++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 content/bn/examples/application/web/web.yaml diff --git a/content/bn/examples/application/web/web.yaml b/content/bn/examples/application/web/web.yaml new file mode 100644 index 0000000000..7b12d521a5 --- /dev/null +++ b/content/bn/examples/application/web/web.yaml @@ -0,0 +1,46 @@ +apiVersion: v1 +kind: Service +metadata: + name: nginx + labels: + app: nginx +spec: + ports: + - port: 80 + name: web + clusterIP: None + selector: + app: nginx +--- +apiVersion: apps/v1 +kind: StatefulSet +metadata: + name: web +spec: + serviceName: "nginx" + replicas: 2 + selector: + matchLabels: + app: nginx + template: + metadata: + labels: + app: nginx + spec: + containers: + - name: nginx + image: registry.k8s.io/nginx-slim:0.8 + ports: + - containerPort: 80 + name: web + volumeMounts: + - name: www + mountPath: /usr/share/nginx/html + volumeClaimTemplates: + - metadata: + name: www + spec: + accessModes: [ "ReadWriteOnce" ] + resources: + requests: + storage: 1Gi