From b7b5ca185b27c66784799104311a7d2093d54013 Mon Sep 17 00:00:00 2001 From: Rajesh1b <118235010+Rajesh1b@users.noreply.github.com> Date: Thu, 26 Sep 2024 15:45:50 +0530 Subject: [PATCH] Create service.yaml --- k8s/service.yaml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 k8s/service.yaml diff --git a/k8s/service.yaml b/k8s/service.yaml new file mode 100644 index 000000000..00e5e077e --- /dev/null +++ b/k8s/service.yaml @@ -0,0 +1,17 @@ +apiVersion: v1 +kind: Service +metadata: + name: petclinic-service +spec: + type: NodePort + selector: + app: petclinic + ports: + - port: 80 + # By default and for convenience, the `targetPort` is set to + # the same value as the `port` field. + targetPort: 8080 + # Optional field + # By default and for convenience, the Kubernetes control plane + # will allocate a port from a range (default: 30000-32767) + nodePort: 30007