apiVersion: v1
kind: Service
metadata:
  name: springboot-svc
  labels:
    app.kubernetes.io/name: springbootapp
    app.kubernetes.io/component: microservice
spec:
  # In a production setup, we recommend accessing Grafana through an external Loadbalancer
  # or through a public IP.
  # type: LoadBalancer
  # You could also use NodePort to expose the service at a randomly-generated port
  type: NodePort
  ports:
    - protocol: TCP
      port: 8080
      targetPort: 8080
  selector:
    app.kubernetes.io/name: springbootapp
    app.kubernetes.io/component: microservice
