From f4482217bc65044fbaea911693ffd269bbe75d66 Mon Sep 17 00:00:00 2001 From: Ajayalla <107462438+Ajayalla@users.noreply.github.com> Date: Tue, 30 Aug 2022 17:28:01 +0530 Subject: [PATCH] Create deploymentservice.yaml --- deploymentservice.yaml | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 deploymentservice.yaml diff --git a/deploymentservice.yaml b/deploymentservice.yaml new file mode 100644 index 0000000..85d8210 --- /dev/null +++ b/deploymentservice.yaml @@ -0,0 +1,36 @@ +apiVersion: apps/v1 +kind: Deployment # Kubernetes resource kind we are creating +metadata: + name: spring-boot-k8s-deployment +spec: + selector: + matchLabels: + app: spring-boot-k8s + replicas: 2 # Number of replicas that will be created for this deployment + template: + metadata: + labels: + app: spring-boot-k8s + spec: + containers: + - name: spring-boot-k8s + image: madhublue01/frontendappication # Image that will be used to containers in the cluster + imagePullPolicy: IfNotPresent + ports: + - containerPort: 8083 # The port that the container is running on in the cluster + + +--- + +apiVersion: v1 # Kubernetes API version +kind: Service # Kubernetes resource kind we are creating +metadata: # Metadata of the resource kind we are creating + name: springboot-k8ssvc +spec: + selector: + app: spring-boot-k8s + ports: + - protocol: "TCP" + port: 8083 # The port that the service is running on in the cluster + targetPort: 8083 # The port exposed by the service + type: NodePort # type of the service.