Kubernetes (K8s) Flashcards

(21 cards)

1
Q

What is Nginx?

A

Nginx is a popular web server that transfers web traffic and requests between your PC and a website’s server.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is a Pod in Kubernetes?

A

A Pod is the smallest unit in Kubernetes that wraps one or more containers and their dependencies.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is kubectl?

A

kubectl is a command-line tool to manage Kubernetes clusters.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is a Node in Kubernetes?

A

A Node is a machine (virtual or physical) where Kubernetes runs Pods.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

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

A

C. The smallest deployable unit, which can contain one or more containers inlcuding all required dependcies.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is Kubernetes (K8s)?

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

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

A

B. Assigns pods to nodes based on resource availability - Scheduler

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

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

A

C. Key-value store for cluster state

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

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

A

B. Ensuring a specified number of pod replicas are running

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

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

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q
  1. 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
A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

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

A

C. The kubelet’s primary purpose is to ensure that containers are running and healthy on each node within a Kubernetes cluster.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What does DNAT stand for and what does it do in Kubernetes?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

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

A

C. Storing non-sensitive config data for pods

ConfigMaps (YAML) hold non-sensitive configuration info like settings or environment variables that pods can use.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What are Namespaces?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What is a Kubernetes Ingress and what does it do?

A

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.

16
Q

What is an Ingress Controller in Kubernetes?

A

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.

17
Q

What is a StorageClass in Kubernetes?

A

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.

17
Q

What is a PersistentVolume (PV) in Kubernetes?

A

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).

18
Q

What is a PersistentVolumeClaim (PVC) in Kubernetes?

A

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.

19
Q

What is kubelet?

A

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).