From 34216380b4947b6a6252cb3d5d64c1e06e828578 Mon Sep 17 00:00:00 2001 From: chaithramallik Date: Sun, 27 Oct 2024 08:52:53 +0530 Subject: [PATCH] Create kube.yaml --- kube.yaml | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 kube.yaml diff --git a/kube.yaml b/kube.yaml new file mode 100644 index 0000000..1330b1e --- /dev/null +++ b/kube.yaml @@ -0,0 +1,37 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: chaithra-deploy + labels: + app: chaithra-deploy-lbl # Label for the deployment itself +spec: + replicas: 3 + selector: + matchLabels: + app: chaithra-app # This label must match the pod template labels + template: + metadata: + labels: + app: chaithra-app # This label should match the service selector + spec: + containers: + - name: chaithra-container + image: chaithra195/banking-javamvnimg + ports: + - containerPort: 8080 # The port that the container listens on + +--- +apiVersion: v1 +kind: Service +metadata: + name: chaithra-np-service + labels: + app: chaithra-app # This can be used for identification; not critical for functionality +spec: + selector: + app: chaithra-app # This must match the pod template label + type: NodePort + ports: + - nodePort: 32080 # External port to access the service + port: 8080 # Port exposed by the service + targetPort: 8080 # Port that the container listens on