0
0
Kubernetesdevops~20 mins

Endpoints and endpoint slices in Kubernetes - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
EndpointSlice Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
Difference between Endpoints and EndpointSlices

Which statement correctly describes the difference between Kubernetes Endpoints and EndpointSlices?

AEndpoints are used only for headless services, while EndpointSlices are used only for ClusterIP services.
BEndpoints store all IP addresses of pods for a service in a single object, while EndpointSlices split these addresses into multiple smaller objects for scalability.
CEndpoints automatically balance traffic, but EndpointSlices require manual load balancing configuration.
DEndpoints are deprecated and replaced by Services, while EndpointSlices are deprecated and replaced by Ingress.
Attempts:
2 left
💡 Hint

Think about how Kubernetes manages large numbers of pod IPs for a service.

💻 Command Output
intermediate
2:00remaining
Output of kubectl get endpointslice command

What is the output of the following command if a service named webapp has 3 pods running?

kubectl get endpointslice -l kubernetes.io/service-name=webapp
A
NAME           ADDRESS-TYPE   PORTS
webapp-abcde   IPv6           443
B
NAME           ADDRESS-TYPE   PORTS
webapp-abcde   IPv4           80
webapp-abcde   IPv4           80
webapp-abcde   IPv4           80
C
NAME           ADDRESS-TYPE   PORTS
webapp-abcde   IPv4           80
webapp-fghij   IPv4           80
webapp-klmno   IPv4           80
DNo resources found in default namespace.
Attempts:
2 left
💡 Hint

EndpointSlices group pod IPs but do not duplicate the same slice multiple times.

Configuration
advanced
2:00remaining
Configuring EndpointSlice Controller

You want to enable EndpointSlice support in your Kubernetes cluster. Which configuration snippet correctly enables the EndpointSlice controller in the kube-controller-manager manifest?

A--feature-gates=EndpointSlices=false
B--enable-controller=endpoint-slice
C--enable-endpointslice-controller=true
D--feature-gates=EndpointSlice=true
Attempts:
2 left
💡 Hint

Look for the standard way Kubernetes enables features via feature gates.

Troubleshoot
advanced
2:00remaining
Troubleshooting missing EndpointSlices

You notice that your service has Endpoints but no EndpointSlices. Which is the most likely cause?

AThe EndpointSlice controller is disabled or not running in the cluster.
BThe service type is LoadBalancer, which does not support EndpointSlices.
CThe pods backing the service are not ready, so EndpointSlices are not created.
DEndpointSlices are only created for services with external IPs.
Attempts:
2 left
💡 Hint

Think about what component manages EndpointSlices.

🔀 Workflow
expert
3:00remaining
Sequence to migrate from Endpoints to EndpointSlices

What is the correct order of steps to migrate a Kubernetes cluster from using Endpoints to EndpointSlices for service discovery?

A1,2,3,4
B2,1,3,4
C1,3,2,4
D3,1,2,4
Attempts:
2 left
💡 Hint

Think about enabling features first, then verifying, then updating services, then monitoring.