From bb858532e07926cc06544433fc09b50e3d981241 Mon Sep 17 00:00:00 2001 From: douzeb Date: Fri, 16 Dec 2022 00:23:50 +0100 Subject: [PATCH] Add k8s-poc-demo application --- deploy/k8s-poc-demo/base/deployment.yaml | 28 +++++++++++++++++++++ deploy/k8s-poc-demo/base/kustomization.yaml | 3 +++ deploy/k8s-poc-demo/base/service.yaml | 13 ++++++++++ 3 files changed, 44 insertions(+) create mode 100644 deploy/k8s-poc-demo/base/deployment.yaml create mode 100644 deploy/k8s-poc-demo/base/kustomization.yaml create mode 100644 deploy/k8s-poc-demo/base/service.yaml diff --git a/deploy/k8s-poc-demo/base/deployment.yaml b/deploy/k8s-poc-demo/base/deployment.yaml new file mode 100644 index 0000000..6aa8819 --- /dev/null +++ b/deploy/k8s-poc-demo/base/deployment.yaml @@ -0,0 +1,28 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: k8s-poc-nginx-deployment + labels: + app: nginx +spec: + selector: + matchLabels: + app: nginx + replicas: 2 + template: + metadata: + labels: + app: nginx + spec: + containers: + - name: nginx + image: nginx:latest + imagePullPolicy: IfNotPresent + ports: + - containerPort: 80 + resources: + requests: + cpu: "100m" + limits: + memory: "256Mi" + cpu: "150m" diff --git a/deploy/k8s-poc-demo/base/kustomization.yaml b/deploy/k8s-poc-demo/base/kustomization.yaml new file mode 100644 index 0000000..a944d00 --- /dev/null +++ b/deploy/k8s-poc-demo/base/kustomization.yaml @@ -0,0 +1,3 @@ +resources: +- deployment.yaml +- service.yaml diff --git a/deploy/k8s-poc-demo/base/service.yaml b/deploy/k8s-poc-demo/base/service.yaml new file mode 100644 index 0000000..ceeee9c --- /dev/null +++ b/deploy/k8s-poc-demo/base/service.yaml @@ -0,0 +1,13 @@ +apiVersion: v1 +kind: Service +metadata: + name: k8s-poc-nginx-service +spec: + type: LoadBalancer + selector: + app: nginx + ports: + - port: 80 + targetPort: 80 + name: http + protocol: TCP