EndpointSlice — scalable, efficient way to track network endpoints.
1apiVersion: discovery.k8s.io/v12kind: EndpointSlice3metadata:4 name: myapp-abc125 namespace: production6 labels:7 kubernetes.io/service-name: myapp8addressType: IPv49ports:10- name: http11 port: 8012 protocol: TCP13endpoints:14- addresses:15 - "10.0.1.5"16 conditions:17 ready: true18 serving: true19 terminating: false20 nodeName: node-121 zone: us-west-2a22 hints:23 forZones:24 - name: us-west-2a25- addresses:26 - "10.0.2.8"27 conditions:28 ready: true29 serving: true30 terminating: false31 nodeName: node-232 zone: us-west-2b
1# Commands2kubectl get endpointslice -n production3kubectl describe endpointslice myapp-abc12 -n production45# Check service endpoints6kubectl get endpoints myapp -n production78# Verify endpoint slice size (max 100 endpoints per slice)9kubectl get endpointslice -l kubernetes.io/service-name=myapp
Advantages over Endpoints: