# Illustrative prerequisites: ready R1/R2 Deployments with matching Pod labels.
# Apply only after adapting the namespace, labels and port to the workload.
apiVersion: v1
kind: Service
metadata:
  name: api-active
  namespace: domain-a
spec:
  selector:
    app: example-api
    release: R1
  ports:
    - name: http
      port: 80
      targetPort: 8080
---
apiVersion: v1
kind: Service
metadata:
  name: api-preview
  namespace: domain-a
spec:
  selector:
    app: example-api
    release: R2
  ports:
    - name: http
      port: 80
      targetPort: 8080
