CKA Service Mesh Basics 1 — Questions and Answers
Question 1: What is a Kubernetes Service?
- An abstraction providing stable networking for a set of Pods (Correct answer)
- A running container
- A storage volume
- A cluster node
Correct answer: An abstraction providing stable networking for a set of Pods
A Service provides a stable IP address and DNS name for accessing a set of Pods, with built-in load balancing regardless of Pod lifecycle changes.
Question 2: What is the difference between ClusterIP and NodePort services?
- ClusterIP is internal only; NodePort exposes the service on each node's IP (Correct answer)
- They are the same
- NodePort is internal only
- ClusterIP uses external load balancers
Correct answer: ClusterIP is internal only; NodePort exposes the service on each node's IP
ClusterIP services are only accessible within the cluster, while NodePort services expose a port on every node's IP address, making the service accessible externally.
Question 3: What is an Ingress in Kubernetes?
- An API object that manages external access to services, typically HTTP (Correct answer)
- A type of Pod
- A storage solution
- A monitoring tool
Correct answer: An API object that manages external access to services, typically HTTP
Ingress defines rules for routing external HTTP/HTTPS traffic to internal services, providing features like SSL termination, path-based routing, and virtual hosting.
Question 4: What is DNS resolution used for in Kubernetes?
- To resolve Service names to IP addresses within the cluster (Correct answer)
- To register domain names
- To encrypt traffic
- To monitor services
Correct answer: To resolve Service names to IP addresses within the cluster
Kubernetes provides internal DNS that automatically resolves Service names to their ClusterIP addresses, enabling Pods to communicate using names instead of IPs.
Question 5: What is a LoadBalancer service type?
- A service that provisions an external load balancer in cloud environments (Correct answer)
- A service running on a single Pod
- An internal-only service
- A monitoring service
Correct answer: A service that provisions an external load balancer in cloud environments
LoadBalancer service type automatically provisions a cloud provider's load balancer, providing an external IP address for accessing the service from outside the cluster.
Question 6: What port does Kubernetes API server listen on by default?
- 6443 (Correct answer)
- 8080
- 443
- 80
Correct answer: 6443
The Kubernetes API server listens on port 6443 by default for secure HTTPS communication.
What is a Kubernetes Service?