Bird
0
0

Given the following command output, what does it indicate about the service 'webapp'?

medium📝 Command Output Q13 of 15
Kubernetes - Services
Given the following command output, what does it indicate about the service 'webapp'?
kubectl get endpoints webapp
NAME     ENDPOINTS           AGE
webapp   10.1.2.3:80,10.1.2.4:80   5m
AThe service 'webapp' is using EndpointSlices instead of Endpoints
BThe service 'webapp' is not connected to any pods
CThe service 'webapp' has pods but no ports exposed
DThe service 'webapp' has two pods with IPs 10.1.2.3 and 10.1.2.4 serving on port 80
Step-by-Step Solution
Solution:
  1. Step 1: Analyze the 'kubectl get endpoints' output

    The output shows two IP addresses with port 80 listed under ENDPOINTS for 'webapp'.
  2. Step 2: Interpret the meaning of listed endpoints

    This means the service routes traffic to two pods at IPs 10.1.2.3 and 10.1.2.4 on port 80.
  3. Final Answer:

    The service 'webapp' has two pods with IPs 10.1.2.3 and 10.1.2.4 serving on port 80 -> Option D
  4. Quick Check:

    Endpoints list pod IPs and ports = The service 'webapp' has two pods with IPs 10.1.2.3 and 10.1.2.4 serving on port 80 [OK]
Quick Trick: Endpoints output shows pod IPs and ports behind service [OK]
Common Mistakes:
  • Assuming no pods are connected when endpoints are listed
  • Confusing EndpointSlices with Endpoints output
  • Ignoring port numbers in the output

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kubernetes Quizzes