Courseiva

CKA · topic practice

Services & Networking practice questions

The Services & Networking domain covers Kubernetes networking primitives: Service types (ClusterIP, NodePort, LoadBalancer, ExternalName), headless Services, Ingress, NetworkPolicy, and cluster DNS. You are tested through hands-on tasks: creating and troubleshooting Services, configuring DNS resolution, and applying NetworkPolicy rules that allow or deny traffic between pods and namespaces.

Courseiva uses original exam-style practice questions designed for learning and revision. The goal is to understand the concepts, recognise exam patterns, and improve through explanations — not memorise copied exam dumps.

Editorial oversight:Johnson Ajibi· MSc IT Security, IEEE Senior Member
20 questionsDomain: Services & Networking

What the exam tests

What to know about Services & Networking

You must create, inspect, and troubleshoot Services, Ingress, DNS, and NetworkPolicy. The most important thing is to verify connectivity with kubectl exec and nslookup, and to remember that NetworkPolicy is additive and default-deny once a pod is selected.

Creating and exposing applications with ClusterIP, NodePort, LoadBalancer, and ExternalName Services

Using headless Services for direct pod DNS records and StatefulSet stable network identities

Configuring pod DNS policies and resolving Service names across namespaces with cluster DNS

Writing NetworkPolicy ingress and egress rules to control pod traffic by labels and ports

Watch out for

Common Services & Networking exam traps

  • ▸Assuming a ClusterIP Service is reachable from outside the cluster; only NodePort or LoadBalancer expose ports externally.
  • ▸Forgetting that a NetworkPolicy selecting pods denies all traffic not explicitly allowed by an ingress or egress rule.
  • ▸Using the wrong namespace-qualified DNS name for cross-namespace Service access, such as missing the namespace or cluster domain suffix.

Practice set

Services & Networking questions

20 questions · select your answer, then reveal the explanation

A developer created a Deployment with 3 replicas and a ClusterIP Service named 'app-service' on port 80 targeting port 8080 on the pods. Pod logs show that the container is listening on 8080, but curl from another pod in the same namespace to http://app-service:80 fails with 'Connection refused'. What is the most likely cause?

Question 2mediummultiple choice
Read the full DNS explanation →

An administrator needs to expose a set of pods running a stateful application that require stable network identities. The pods must be reachable from outside the cluster via a DNS name that resolves to individual pod IPs. Which Service type should be used?

Which THREE of the following are true about Network Policies in Kubernetes?

A pod in the same namespace tries to reach 'my-service' on port 80, but gets 'Connection refused'. The pod's labels are 'app: my-app'. What is the most likely cause?

Exhibit

Refer to the exhibit.

```
$ kubectl describe svc my-service
Name:              my-service
Namespace:         default
Labels:            <none>
Annotations:       <none>
Selector:          app=my-app
Type:              ClusterIP
IP Family Policy:  SingleStack
IP Families:       IPv4
IP:                10.96.100.10
IPs:               10.96.100.10
Port:              http  80/TCP
TargetPort:        8080/TCP
Endpoints:         <none>
```

After applying this NetworkPolicy, a pod in the default namespace tries to curl an external website (e.g., google.com) and fails. What is the reason?

Exhibit

Refer to the exhibit.

```
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
  name: deny-all
  namespace: default
spec:
  podSelector: {}
  policyTypes:
  - Ingress
  - Egress
```

A Kubernetes cluster uses a NetworkPolicy to restrict traffic to a set of pods labeled 'app: db'. Which TWO statements about the following NetworkPolicy are correct?

apiVersion: networking.k8s.io/v1 kind: NetworkPolicy metadata: name: db-policy spec: podSelector: matchLabels: app: db policyTypes: - Ingress ingress: - from: - podSelector: matchLabels: app: api ports: - port: 5432

Question 7hardmultiple choice
Read the full DNS explanation →

You are a platform engineer managing a multi-tenant Kubernetes cluster. A development team deploys a StatefulSet for a database with the following configuration: 3 replicas, headless service 'db-headless' for DNS-based discovery, and a regular ClusterIP service 'db' for read/write operations. The cluster uses Calico CNI with default NetworkPolicy enforcement. The team reports that applications in the same namespace can connect to the ClusterIP service but cannot connect to individual pod DNS names (e.g., db-0.db-headless.namespace.svc.cluster.local). You verify that the DNS resolution works (nslookup returns the pod IP). However, a curl to the pod IP on the database port (5432) times out. You check the endpoints and they are correct. Which action should you take to resolve the connectivity issue?

Which TWO of the following are valid ways to expose a Kubernetes Service to external traffic?

Question 9hardmultiple choice
Read the full DNS explanation →

You are a Kubernetes administrator overseeing a multi-tier application in a production cluster. The application consists of a front-end web server (Deployment 'frontend') and a backend API (Deployment 'backend'). The frontend needs to communicate with the backend using the DNS name 'backend-service' within the same namespace 'prod'. Users report intermittent 'Connection Refused' errors when accessing the frontend, which then cannot reach the backend. After checking the backend pods, they are all running and ready. The backend Service is defined as a ClusterIP service with no ports specified in the YAML manifest. What is the most likely cause of the failure?

Drag and drop the steps to upgrade a Kubernetes cluster using kubeadm into the correct order.

Drag or tap steps into the slots.

Steps
Order
1Step 1
2Step 2
3Step 3
4Step 4
5Step 5

Drag and drop the steps to configure RBAC for a user to list pods in a specific namespace into the correct order.

Drag or tap steps into the slots.

Steps
Order
1Step 1
2Step 2
3Step 3
4Step 4
5Step 5

Match each network policy concept to its description.

Drag a concept onto its matching description — or click a concept then click the description.

Concepts
Matches

Controls incoming traffic to Pods

Controls outgoing traffic from Pods

Selects Pods to which the policy applies

Specifies whether rules apply to Ingress, Egress, or both

Isolates all Pods in a namespace by default

Match each storage concept to its definition.

Drag a concept onto its matching description — or click a concept then click the description.

Concepts
Matches

Request for storage by a user

Describes storage provisioner and parameters

Mounts a file or directory from the host Node

Temporary storage that shares a Pod's lifecycle

Standard interface for storage plugins

Question 14hardmultiple choice
Read the full DNS explanation →

A cluster has multiple namespaces: 'frontend', 'backend', and 'monitoring'. A pod in the 'frontend' namespace needs to reach a Service named 'db-service' in the 'backend' namespace. The 'db-service' Service is of type ClusterIP. Which DNS name should the pod use?

Question 15easymultiple choice
Read the full DNS explanation →

A pod is running with the default DNS policy. The cluster DNS service is at 10.96.0.10. The node's /etc/resolv.conf has nameserver 8.8.8.8. When the pod tries to resolve an external hostname like 'example.com', which DNS server will it query first?

An administrator notices that traffic to a Service is not being forwarded to any pod. The Service has selector 'app: web' and there are pods with that label. However, 'kubectl get endpoints' shows no endpoints. What is the most likely cause?

A Kubernetes cluster uses Calico as the CNI plugin. Two pods on different nodes cannot communicate, but pods on the same node can. Network policies are not enforced. What is the most likely cause?

A company wants to expose a web application running as a Deployment with 3 replicas to external users. They need a stable IP address that does not change and the ability to terminate TLS. Which resource should they use?

Which TWO of the following are valid reasons to use a Headless Service?

You are tasked with troubleshooting a web application that is deployed in a Kubernetes cluster. The application consists of a Deployment named 'web-app' with 3 replicas, each running a container that listens on port 3000. A Service named 'web-service' of type ClusterIP with selector 'app: web' and port 80 targeting port 3000 has been created. Additionally, an Ingress resource named 'web-ingress' is configured with a host rule for 'example.com' and backend service 'web-service' on port 80. Users report that accessing http://example.com results in a 503 Service Unavailable error. You verify that all pods are running, but kubectl get pods shows the READY column as 0/1 for each pod. The Ingress controller logs show 'upstream connect error or disconnect/reset before headers'. You check the endpoints: 'kubectl get endpoints web-service' shows no endpoints. The pods have the label 'app: web'. What should you do to resolve the issue?

Free account

Track your progress over time

Create a free account to save your results and see which topics improve across sessions.

Focused Services & Networking sessions

Start a Services & Networking only practice session

Every question in these sessions is drawn from the Services & Networking domain — nothing else.

Related practice questions

Related CKA topic practice pages

Move into related areas when this topic feels solid.

Frequently asked questions

What does the CKA exam test about Services & Networking?
You must create, inspect, and troubleshoot Services, Ingress, DNS, and NetworkPolicy. The most important thing is to verify connectivity with kubectl exec and nslookup, and to remember that NetworkPolicy is additive and default-deny once a pod is selected.
How should I use these practice questions?
Select your answer before revealing the explanation. Then read why each option is right or wrong — this active recall approach builds retention far faster than re-reading notes.
Can I practise just Services & Networking questions in a focused session?
Yes — the session launcher on this page draws every question from the Services & Networking domain. Use a 10-question session first to gauge your baseline, then move to 20 or 30 once the weak spots are clear.
Where can I practise other CKA topics?
Use the topic links above to move to related areas, or go back to the CKA question bank to see all topics.
Are these real exam questions or dumps?
These are original practice questions written to test the same concepts the CKA exam covers. They are not copied from any real exam or dump site.