Search⌘ K
AI Features

Introspecting Services and Endpoint Objects

Explore how to introspect Kubernetes Services and EndpointSlice objects using standard kubectl commands. Understand how Services expose Pods via IP addresses and ports, how EndpointSlices track Pods, and how to manage these resources in different cluster environments.

Run the following widget and use it to execute all the commands in this lesson.

apiVersion: apps/v1
kind: Deployment
metadata:
  name: svc-test
spec:
  replicas: 10
  selector:
    matchLabels:
      chapter: services
  template:
    metadata:
      labels:
        chapter: services
    spec:
      containers:
      - name: hello-ctr
        image: nigelpoulton/k8sbook:1.0
        ports:
        - containerPort: 8080
Playground

Inspecting Services

...