kind: Service
apiVersion: v1
metadata:
  name: whoami
  namespace: default

spec:
  clusterIP: 10.10.10.1
  ports:
    - name: web2
      protocol: TCP
      port: 8000
      targetPort: web2
    - name: web
      protocol: TCP
      port: 80
      targetPort: web
  selector:
    app: whoami

---
kind: EndpointSlice
apiVersion: discovery.k8s.io/v1
metadata:
  name: whoami
  namespace: default
  labels:
    kubernetes.io/service-name: whoami

addressType: IPv4
ports:
  - name: web
    port: 80
  - name: web2
    port: 8000
endpoints:
  - addresses:
      - 10.10.0.1
      - 10.10.0.2
    conditions:
      ready: true

---
apiVersion: v1
kind: Service
metadata:
  name: whoami-tls
  namespace: default

spec:
  clusterIP: 10.10.10.2
  ports:
    - name: websecure
      protocol: TCP
      appProtocol: https
      port: 443
      targetPort: websecure
  selector:
    app: whoami-tls

---
kind: EndpointSlice
apiVersion: discovery.k8s.io/v1
metadata:
  name: whoami-tls
  namespace: default
  labels:
    kubernetes.io/service-name: whoami-tls

addressType: IPv4
ports:
  - name: websecure
    port: 8443
endpoints:
  - addresses:
      - 10.10.0.3
      - 10.10.0.4
    conditions:
      ready: true

---
kind: Service
apiVersion: v1
metadata:
  name: whoami-b
  namespace: default

spec:
  clusterIP: 10.10.10.3
  ports:
    - name: web2
      protocol: TCP
      port: 8000
      targetPort: web2
    - name: web
      protocol: TCP
      port: 80
      targetPort: web
  selector:
    app: whoami_b

---
kind: EndpointSlice
apiVersion: discovery.k8s.io/v1
metadata:
  name: whoami-b
  namespace: default
  labels:
    kubernetes.io/service-name: whoami-b

addressType: IPv4
ports:
  - name: web
    port: 80
  - name: web2
    port: 8000
endpoints:
  - addresses:
      - 10.10.0.5
      - 10.10.0.6
    conditions:
      ready: true

---
kind: Service
apiVersion: v1
metadata:
  name: empty
  namespace: default

spec:
  clusterIP: 10.10.10.4
  ports:
    - name: web2
      protocol: TCP
      port: 8000
      targetPort: web2
    - name: web
      protocol: TCP
      port: 80
      targetPort: web
  selector:
    app: empty
    task: empty

---
kind: EndpointSlice
apiVersion: discovery.k8s.io/v1
metadata:
  name: empty
  namespace: default
  labels:
    kubernetes.io/service-name: empty

addressType: IPv4
ports:
  - name: web
    port: 80
  - name: web2
    port: 8000
endpoints:
  - addresses: []
    conditions:
      ready: true

---
kind: Service
apiVersion: v1
metadata:
  name: canary
  namespace: default

spec:
  clusterIP: 10.10.10.5
  ports:
    - name: web2
      protocol: TCP
      port: 8000
      targetPort: web2
    - name: web
      protocol: TCP
      port: 80
      targetPort: web
  selector:
    app: whoami

---
kind: EndpointSlice
apiVersion: discovery.k8s.io/v1
metadata:
  name: canary
  namespace: default
  labels:
    kubernetes.io/service-name: canary

addressType: IPv4
ports:
  - name: web
    port: 80
  - name: web2
    port: 8000
endpoints:
  - addresses:
      - 10.10.0.7
      - 10.10.0.8
    conditions:
      ready: true

---
kind: Service
apiVersion: v1
metadata:
  name: external
  namespace: default

spec:
  type: ExternalName
  externalName: external.com
  ports:
    - port: 80
      targetPort: 8080
      name: http
