service.yaml
494 Bytes
apiVersion: v1
kind: Service
metadata:
name: product-service
namespace: ecommerce
labels:
app: product-service
service: backend
annotations:
prometheus.io/scrape: "true"
prometheus.io/port: "8080"
prometheus.io/path: "/actuator/prometheus"
spec:
ports:
- name: http
port: 8080
targetPort: 8080
protocol: TCP
- name: metrics
port: 8081
targetPort: 8081
protocol: TCP
selector:
app: product-service
type: ClusterIP