Flashcards · Kubernetes · Free
Kubernetes flashcards, generated for you.
Example Kubernetes study cards to learn from right now — then generate a full set from your own notes (plus a practice quiz) and export to Quizlet or Anki. Free, no account needed.
Example Kubernetes flashcards
What is a Kubernetes Service and why is it needed?
A Service is an abstraction that exposes pods via a stable IP/DNS name. It's needed because pods are ephemeral; Services provide consistent networking and load balancing across pod replicas.
Name the four main Kubernetes Service types.
ClusterIP (internal only), NodePort (external via node port), LoadBalancer (cloud LB), and ExternalName (maps to external DNS).
What does `kubectl get svc` show and how do you describe a specific service?
`kubectl get svc` lists all services with cluster IPs and ports. Use `kubectl describe svc <name>` to see endpoints, selectors, and traffic routing details.
How does a Service route traffic to pods?
A Service uses a label selector to match pods. kube-proxy watches the Endpoints object and maintains iptables/IPVS rules to forward traffic from the service IP to matching pod IPs.
What is the difference between ClusterIP and NodePort?
ClusterIP is only accessible within the cluster via stable IP. NodePort exposes the service on every node's IP at a port (30000-32767), allowing external access.
What command deploys a simple application and exposes it quickly?
`kubectl create deployment <name> --image=<image>` creates the deployment, then `kubectl expose deployment <name> --port=<port> --type=NodePort` creates a Service.
What is a Headless Service and when would you use it?
A Headless Service has `clusterIP: None`. It returns individual pod IPs via DNS instead of a single service IP. Use for stateful applications (StatefulSets) where you need direct pod communication.
What does `kubectl port-forward` do and provide an example?
`kubectl port-forward` forwards local port traffic to a pod/service port, bypassing the service network. Example: `kubectl port-forward svc/<svc-name> 8080:80` forwards localhost:8080 to service port 80.
What is an Ingress and how does it differ from a Service?
Ingress is an API object for HTTP/HTTPS routing, providing host/path-based rules and TLS termination. Services handle layer 4 (TCP/UDP); Ingress handles layer 7 (HTTP/HTTPS) and requires an Ingress Controller.
How do you troubleshoot service connectivity issues?
Check: (1) pod labels match service selector (`kubectl get pods --show-labels`), (2) endpoints are populated (`kubectl get endpoints`), (3) pod logs (`kubectl logs`), (4) DNS resolution (`kubectl run -it --rm debug --image=nicolaka/netshoot -- bash` then test with `nslookup`/`curl`).
Make your own Kubernetes study set
Flashcards for related topics
Studying Kubernetes to build with AI? MindloomHQ turns it into real skills — structured courses, agent projects, and certificates.
Explore MindloomHQ →