1. What is RBAC in Kubernetes?
AdvancedAnswer: Role-Based Access Control for authorization
RBAC is a method for regulating access to resources. Uses Roles/ClusterRoles to define permissions and Bindings to assign them.
24 questions that come up in Kubernetes technical interviews, each with the answer and an explanation of why it is right.
Test yourself — 90 question bankAnswer: Role-Based Access Control for authorization
RBAC is a method for regulating access to resources. Uses Roles/ClusterRoles to define permissions and Bindings to assign them.
Answer: An open-source container orchestration platform
Kubernetes (K8s) is an open-source container orchestration platform that automates deployment, scaling, and management of containerized applications.
Answer: Role is namespaced, ClusterRole is cluster-wide
Role grants permissions within a namespace. ClusterRole grants cluster-wide permissions or access to cluster-scoped resources.
Answer: The smallest deployable unit containing one or more containers
A Pod is the smallest deployable unit in Kubernetes. It represents one or more containers that share network and storage resources.
Answer: Command-line tool for interacting with Kubernetes
kubectl is the command-line tool for communicating with a Kubernetes cluster. It allows you to run commands against clusters.
Answer: Both a and b
Use envFrom with configMapRef in Pod spec to mount ConfigMap as environment variables. All keys become environment variables.
Answer: Extends Kubernetes API with custom resource types
CRD extends the Kubernetes API by defining custom resource types. Enables operators and custom controllers for domain-specific resources.
Answer: kubectl get pods
`kubectl get pods` lists all Pods in the current namespace. Add `-A` or `--all-namespaces` to see Pods across all namespaces.
Answer: Application-specific controller using CRDs
Operator is application-specific controller that uses CRDs. Automates operational tasks like deployment, scaling, backup, recovery.
Answer: Codifies operational knowledge into software
Operator pattern codifies operational knowledge into software. Custom controller watches custom resources and takes action to maintain desired state.
Answer: Virtual cluster for logical isolation
Namespaces provide logical isolation for resources within a cluster. They enable multi-tenancy and resource organization.
Answer: Stable network endpoint that abstracts access to Pods
A Service is an abstraction that defines a logical set of Pods and a policy to access them. It provides stable networking and load balancing.
Answer: Package manager for Kubernetes using charts
Helm is a package manager for Kubernetes. Uses charts (packages) with templates to simplify application deployment and management.
Answer: Manages ReplicaSets and provides declarative updates for Pods
A Deployment manages ReplicaSets and provides declarative updates for Pods. It handles rolling updates, rollbacks, and scaling.
Answer: Package of Kubernetes resources with templates
Helm Chart is a package containing Kubernetes resource templates and default values. Charts are reusable and can be shared via repositories.
Answer: Template-free customization with overlays
Kustomize provides template-free customization of Kubernetes configs. Uses overlays and patches. Integrated into kubectl with -k flag.
Answer: Manages external HTTP/HTTPS access to Services
Ingress manages external access to Services, typically HTTP/HTTPS. Provides load balancing, SSL termination, and name-based virtual hosting.
Answer: Set of components that manage the cluster
The control plane manages the Kubernetes cluster. Components include API server, scheduler, controller manager, and etcd.
Answer: Implements Ingress rules as Pods
Ingress Controller implements Ingress rules. It must be installed separately (nginx-ingress, traefik, etc.) and runs as Pods.
Answer: Intercepts API requests before persisting to etcd
Admission Controllers intercept API requests before persisting to etcd. Can validate or mutate requests. Examples: PodSecurityPolicy, ResourceQuota.
Answer: Ensures Pod runs on all Nodes
DaemonSet ensures a copy of a Pod runs on all (or some) Nodes. Used for node-level services like log collection and monitoring.
Answer: Manages stateful applications with stable identities
StatefulSet manages stateful applications. Provides stable network identities, persistent storage, and ordered deployment/scaling.
Answer: Custom admission controller that validates and can reject requests
ValidatingAdmissionWebhook validates objects and can reject requests. Runs after mutating webhooks. Used for custom validation logic.
Answer: kubectl apply -f file.yaml
`kubectl apply -f file.yaml` creates or updates resources declaratively. `kubectl create -f` also works but apply is preferred for updates.
The full Kubernetes bank has 90 questions across 3 difficulty levels — timed, shuffled, and scored.
Take the Kubernetes quiz