Kubernetes (K8s) Flashcards
(21 cards)
What is Nginx?
Nginx is a popular web server that transfers web traffic and requests between your PC and a website’s server.
What is a Pod in Kubernetes?
A Pod is the smallest unit in Kubernetes that wraps one or more containers and their dependencies.
What is kubectl?
kubectl is a command-line tool to manage Kubernetes clusters.
What is a Node in Kubernetes?
A Node is a machine (virtual or physical) where Kubernetes runs Pods.
What is a Pod in Kubernetes?
A. A single container
B. A group of containers running on the same node
C. The smallest deployable unit, which can contain one or more containers
D. A network policy
C. The smallest deployable unit, which can contain one or more containers inlcuding all required dependcies.
What is Kubernetes (K8s)?
Kubernetes is an open-source system that automates running and managing containerized apps across multiple machines. It helps you deploy, scale, and manage apps easily.
K8s = the 8 letteres between the K and the S in KuberneteS
What does the Kubernetes Scheduler do?
A. Runs health checks on pods
B. Assigns pods to nodes based on resource availability
C. Manages network policies
D. Handles persistent storage
B. Assigns pods to nodes based on resource availability - Scheduler
What is the role of etcd in Kubernetes?
A. Container image registry
B. Network plugin
C. Key-value store for cluster state
D. Load balancer
C. Key-value store for cluster state
What is a ReplicaSet used for?
A. Storing container logs
B. Ensuring a specified number of pod replicas are running
C. Encrypting pod traffic
D. Managing persistent volumes
B. Ensuring a specified number of pod replicas are running
What is a Kubernetes Service used for?
A. Creating containers
B. Applying security patches
C. Exposing a set of pods under one stable IP/DNS name
D. Updating the kubelet
C. Exposing a set of pods under one stable IP/DNS name. A Service gives a stable IP and DNS name to access pods — even if the pods themselves change.
- What does a Deployment in Kubernetes do?
A. Updates etcd
B. Manages the desired state of an application, ensuring a specified number of pod replicas are running and healthy by controlling/managing ReplicaSets
C. Installs the kubelet
D. Creates persistent volumes
Deployments (high level controller) in K8S manages ReplicaSet (low level controller). B. Manages the desired state of an application, ensuring a specified number of pod replicas are running and healthy
What’s the purpose of a kubelet?
A. Stores container images
B. Handles web requests
C. Ensures containers are running on a node
D. Encrypts network traffic
C. The kubelet’s primary purpose is to ensure that containers are running and healthy on each node within a Kubernetes cluster.
What does DNAT stand for and what does it do in Kubernetes?
DNAT = Destination Network Address Translation. It changes the destination IP address of network packets to route traffic from a Service IP to the correct Pod IP. Thereby load balancing traffic to one of multiple pod IP’s behind the Service IP address.
What is a ConfigMap used for?
A. Monitoring pod logs
B. Managing cluster nodes
C. Storing non-sensitive config data for pods
D. Encrypting secrets
C. Storing non-sensitive config data for pods
ConfigMaps (YAML) hold non-sensitive configuration info like settings or environment variables that pods can use.
What are Namespaces?
Namespaces are like folders inside a
Kubernetes cluster to keep things separate/organised to prevent them interfering with each other. They let you divide cluster resources between multiple teams or projects.
Namespaces limit the scope of containers and their related resources within a KB cluster (so they don’t interfere with other containers).
Like subnetting splits a network into smaller parts for manageability and isolation each namespace groups resources so that their aren’t name conflics, more granular RBAC control.
What is a Kubernetes Ingress and what does it do?
KB Ingress = a resource that defines how incoming external traffic to the cluster is routed to different services based on rules like hostnames or URL paths. Manages external HTTP/S access to services inside a cluster.
What is an Ingress Controller in Kubernetes?
Ingress Controller = the component (usually pods) that watches/reads Ingress resources (rulebooks) and routes external traffic coming into (ingressing) the cluster based on those rules.
What is a StorageClass in Kubernetes?
A StorageClass is a resource that defines how storage is dynamically provisioned (setup and configured), specifying the type and parameters (size) of storage to create. It is stored in a YAML file.
What is a PersistentVolume (PV) in Kubernetes?
A Persistent Volume is a storage resource in a cluster (cluster-level resource outside container or pod) representing physical or cloud storage that admins create manually or is provisioned dynamically via a PVC (PersistenVolumeClaim request).
What is a PersistentVolumeClaim (PVC) in Kubernetes?
A PVC (PersistentVolumeClaim) is a user’s or apps REQUEST FOR STORAGE specifying size and access modes, which binds to a matching PersistentVolume if one is available else a PV is dynamically provisioned.
What is kubelet?
Kubelet is an agent running on each Kubernetes worker node that manages containers and communicates with the control plane. It performs small event-driven local tasks and reports status back to the kube-apiserver running on the master node (vm/machine that’s running kubernetes (control plane).