Link Search Menu Expand Document

Endpoints

endpoint-slice.yaml

---
# https://kubernetes.io/docs/concepts/services-networking/endpoint-slices/
apiVersion: discovery.k8s.io/v1
kind: EndpointSlice
metadata:
  name: endpoint-slices
addressType: IPv4
ports:
  - name: http
    protocol: TCP
    port: 80
endpoints:
  - addresses:
      - "10.1.2.3"
    conditions:
      ready: true
    hostname: pod-1
    nodeName: node-1
    zone: us-west2-a

service-and-endpoint.yaml

---
# https://kubernetes.io/docs/concepts/services-networking/service/#services-without-selectors
apiVersion: v1
kind: Service
metadata:
  name: service-and-endpoint
spec:
  ports:
    - protocol: TCP
      port: 80
      targetPort: 9376
---
apiVersion: v1
kind: Endpoints
metadata:
  name: service-and-endpoint
subsets:
  - addresses:
      - ip: 192.0.2.42
    ports:
      - port: 9376