Persistent Concepts in Kubernetes Flashcards

1
Q

What is the main challenge persistent storage solves in Kubernetes?

A

Persistent storage solves the challenge of preserving data even when containers are destroyed, allowing data to persist beyond the lifecycle of containers.

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

What are the two ways to use storage in Kubernetes?

A

The two ways to use storage in Kubernetes are the “static way” and the “dynamic way.”

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

What is a key benefit of using storage classes in Kubernetes?

A

Storage classes eliminate the need to pre-provision persistent volumes and support multiple persistent volume claims, making them more flexible.

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

How can you externalize configuration values in Kubernetes using Config Maps?

A

You can externalize configuration values in Kubernetes by using Config Maps to store key-value pairs, which are then injected as environment variables into containers.

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

What is one advantage of using volumes with Config Maps in Kubernetes?

A

Using volumes with Config Maps allows for dynamic updates of configuration values in containers without requiring container restarts.

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

What is a Persistent Volume (PV) in Kubernetes?

A

A Persistent Volume (PV) is a storage resource that is available cluster-wide and is provisioned by the cluster administrator.

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

What is a Persistent Volume Claim (PVC) used for in Kubernetes?

A

A Persistent Volume Claim (PVC) is used by a pod to claim a Persistent Volume (PV) and request a specific amount of storage.

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

How can you specify the capacity, access mode, and reclaim policy for a Persistent Volume (PV) in Kubernetes?

A

You can specify the capacity, access mode, and reclaim policy for a Persistent Volume (PV) in its YAML manifest under the spec section.

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

What is the key difference between static provisioning and dynamic provisioning of storage in Kubernetes?

A

Static provisioning requires the cluster administrator to pre-provision Persistent Volumes (PVs) with fixed capacity, while dynamic provisioning allows PVs to be provisioned automatically based on Persistent Volume Claims (PVCs).

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

What is the purpose of the reclaimPolicy property in a Persistent Volume (PV) definition in Kubernetes?

A

The reclaimPolicy property determines what happens to the storage associated with a PV when the PV is released. It can be set to “Retain” to preserve data or “Delete” to delete data.

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

What is the primary purpose of Storage Classes in Kubernetes?

A

Storage Classes in Kubernetes are used to define and manage dynamic provisioning of Persistent Volumes (PVs) based on user-defined policies.

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

How do Storage Classes simplify the process of provisioning storage in Kubernetes?

A

Storage Classes abstract the details of storage provisioning, allowing users to request storage without needing to know the specific details of the underlying infrastructure.

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

What is the key benefit of using Storage Classes for storage provisioning in Kubernetes?

A

The key benefit is that Storage Classes allow for on-demand provisioning of storage resources, eliminating the need for manual pre-provisioning by administrators.

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

What are the essential components of a Storage Class definition in Kubernetes?

A

A Storage Class definition typically includes the provisioner (the volume plugin to use), parameters (configuration for the provisioner), and a reclaim policy (determining what happens to the storage when released).

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

How can users request storage with a specific Storage Class in Kubernetes?

A

Users can request storage with a specific Storage Class by specifying the Storage Class name in their Persistent Volume Claim (PVC) manifest.

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

What is the primary purpose of Config Maps in Kubernetes?

A

Config Maps in Kubernetes are used to decouple configuration data from application code, making it easier to manage and update configuration values.

17
Q

How are Config Maps typically created in Kubernetes?

A

Config Maps are typically created using YAML files or by using imperative commands in Kubernetes.

18
Q

What types of configuration data can be stored in a Config Map?

A

Config Maps can store key-value pairs, environment variable values, or configuration files.

19
Q

How are values from a Config Map typically injected into a pod as environment variables?

A

Values from a Config Map are injected into a pod as environment variables by referencing the Config Map’s key in the pod’s environment section.

20
Q

What is one drawback of using Config Maps for configuration management in Kubernetes?

A

Config Maps are static, meaning that changes to their values require pod restarts to take effect.

21
Q

How can you create a Config Map using a YAML file in Kubernetes?

A

You can create a Config Map in Kubernetes using a YAML file by defining the Config Map’s name and key-value pairs in the data section of the YAML file.

22
Q

How is a pod configured to use values from a Config Map as environment variables?

A

In the pod’s YAML definition, you can define environment variables and use the valueFrom field with configMapKeyRef to reference the Config Map’s name and key.

23
Q

What is the expected behavior of the pod created in the lab when it uses values from the Config Map?

A

The pod should use the values from the Config Map as environment variables. In this specific lab, it uses the “City” value from the Config Map as the “City” environment variable.