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