Introduction to K8s Quiz
Quiz
Kubernetes is an open-source container orchestration platform that automates the deployment, scaling, networking, and management of containerized applications.
Core problems it solves:
- Manual deployment orchestration: replaces SSHing into individual servers
- Resource inefficiency: intelligent bin-packing maximizes utilization
- Scaling complexity: horizontal scaling with a single command
- Poor fault tolerance: self-healing detects and replaces failures automatically
Did you get it right?
The Reconciliation Loop is Kubernetes’ core control mechanism where controllers continuously compare the desired state (what you want) with the actual state (current reality) and take corrective actions to reconcile any differences.
Controllers watch the cluster state via the API server, detect any drift, and take corrective actions to reconcile the difference.
Why it’s important:
- Enables self-healing: automatically recovers from failures
- Maintains desired state: ensures declared configuration is always enforced
- Runs continuously: checks every ~30 seconds
- Reduces manual intervention: system corrects itself automatically
Did you get it right?
kubectl _____ -f deployment.yamlkubectl apply command is used to deploy or update resources declaratively. It applies the configuration from the YAML file to your cluster. This is the preferred declarative approach in Kubernetes.kubectl apply command is used to deploy or update resources declaratively. It applies the configuration from the YAML file to your cluster. This is the preferred declarative approach in Kubernetes.# dev/configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
name: app-config
namespace: dev
data:
LOG_LEVEL: "debug"
# prod/configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
name: app-config
namespace: prod
data:
LOG_LEVEL: "info"Imperative: You specify HOW — step-by-step commands (‘Start 3 servers’, ‘Update to version 2.0’). Like giving turn-by-turn directions.
Declarative (Kubernetes): You specify WHAT — desired state (‘I want 3 replicas running’). Like giving a destination; the system figures out how to get there.
Why declarative wins:
- Self-healing: system continuously maintains desired state
- Reproducible: same manifest always produces the same result
- Version controlled: infrastructure defined as code
Did you get it right?
kubectl rollout undo to revert. Option B is the most common misconception: K8s is self-healing for crashes but does not automatically roll back a deployment that fails health checks.kubectl rollout undo to revert. Option B is the most common misconception: K8s is self-healing for crashes but does not automatically roll back a deployment that fails health checks.kubectl), not Docker’s.kubectl), not Docker’s.