BM: Baca dalam Bahasa Melayu
World K3: Counters & Doors
EndpointSlices: who answers?
You will learn: to see which pods answer a Service, and fix one that nobody answers.
Checked with Kubernetes 1.37 on 31 Oct 2026
The problem
kind-dev namespace defaultThe menu has an order number, but you get Connection refused. Plain words: no tray stands behind that number.
Try it
An EndpointSlice: The list behind an order number: which ready pods a Service sends to. is the list behind an order number. It names the trays that answer. This Service wants both labels. Make it pick the two shop trays.
Drag a label onto a tray, or tap a label, then a tray.
Service shop (order number)
selector:app=shoptier=web
Picks 1 trays.
Labels
shop-1
- app=shop
- tier=web
shop picks this tray.
shop-2
- app=shop
Not picked: needs tier=web.
api-1
- app=api
- tier=web
Not picked: needs app=shop.
kubectl get endpointslices -l kubernetes.io/service-name=shopNAME ADDRESSTYPE PORTS ENDPOINTS AGEshop-2jl8t IPv4 80 10.244.1.84 12s
Hint
A tray must have every label in the selector.Watch
kind-dev namespace defaultThe list follows the trays. Scale down to one, and the list shrinks to one. A tray that is not ready drops off too.
Try it
Detective time. Find why the menu has no trays. Then remake its order number.
kind-dev namespace defaultmenu0/0 ready no ready traysshop3/3 ready
dev-control-planeOpenManagerNo trays here.
dev-workerOpen- client
- shop·hj8bg
- shop·rs5v6
dev-worker2Open- menu·n8ltw
- shop·p7794
Hint
kubectl expose deployment menu --port=80 copies the Deployment’s own selector, so it matches.Predict
A tray fails its readiness probe. Does the order number still send it orders?
Pick one answer.
Check
A Service has no endpoints. Put the steps in order.
First step at the top. Put these in order. Use the arrows, or drag.
- Check the endpoints again
- Fix the selector or the labels
- kubectl describe service menu (read the Selector)
- kubectl get pods --show-labels
- kubectl get endpointslices -l kubernetes.io/service-name=menu
You did it!
You can now see who answers a Service, and fix it.
Go deeper (optional)
The older Endpoints object is deprecated since Kubernetes 1.33. Use EndpointSlices. One slice holds up to 100 endpoints by default. A big Service gets several slices. A pod that is shutting down stays listed for a moment, marked not ready.
Real rep (optional), on a throwaway kind cluster:
Real mission
kubectl get endpointslices -l kubernetes.io/service-name=shopkubectl create service clusterip nobody --tcp=80:80kubectl get endpointslices -l kubernetes.io/service-name=nobody
0 of 3 steps done · Your ticks are saved.
Bahasa Melayu
Menu ada nombor pesanan, tapi anda dapat Connection refused. Maksudnya: tiada dulang di belakang nombor itu.
EndpointSlice ialah senarai di belakang nombor pesanan. Ia namakan dulang yang menjawab. Service ini mahu kedua-dua label. Buat ia pilih dua dulang kedai.
Senarai ikut dulang. Scale turun ke satu, senarai pun tinggal satu. Dulang yang belum sedia pun keluar dari senarai.
Masa jadi detektif. Cari kenapa menu tiada dulang. Kemudian buat semula nombor pesanannya.
kubectl expose deployment menu --port=80 salin selector Deployment itu sendiri, jadi ia sepadan.Satu dulang gagal readiness probe. Adakah nombor pesanan masih hantar pesanan kepadanya?
Sebuah Service tiada endpoint. Susun langkahnya.
Kini anda boleh lihat siapa jawab sebuah Service, dan baikinya.
You finished this before. Practice is always welcome!
Official docs: Kubernetes: EndpointSlices · Kubernetes: debug Services
You've learned for 25 minutes. A short break helps your brain.
Sprint done! Great focus. Stretch for a minute?