Knowledge Check: Kubernetes Basics Flashcards

1
Q

Pod

A

a group of one or more containers (such as Docker containers), the shared storage for those containers, and options about how to run the containers.

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

What provides load balancing across a set of pods

A

Services

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

What are some reasons you would prefer to use Deployments rather than unmanaged pods?

A
  1. Deployments are compatible with Horizontal Pod Autoscalers
  2. Deployments can reschedule pods that fail
  3. Deployments support rolling updates and rollbacks
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

True or False: Deployments support rolling updates and rollbacks?

A

True

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

True or False: Deployments are unable to reschedule pods that fail?

A

False. Deployments can reschedule failed pods.

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

True or false: Deployments are compatible with horizontal pod autoscalers?

A

True

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

True or false: Deployments support a variety of restart policies

A

False

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

True or False: A Service provides a mechanism for accessing a logical set of pods?

A

True

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

What are the the Kubernetes Service types?

A

NodePort
LoadBlancer
ClusterIP
ExternalName

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

What is a ClusterIP Service?

A

Exposes a service which is only accessible from within the cluster.

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

What is a NodePort Service?

A

Exposes a service via a static port on each node’s IP.

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

What is a LoadBalancer Service?

A

Exposes the service via the cloud provider’s load balancer.

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

What is an ExternalName Service?

A

Maps a service to a predefined externalName field by returning a value for the CNAME record.

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

How does an ExternalName service map a service to a predefined External field?

A

By returning a value for the CNAME record.

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

What is PersistentVolume

A

a piece of storage in the cluster that has been provisioned by an administrator or dynamically provisioned using Storage Classes.

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

True or False PersistentVolume lifecycle is tied to the pod which claimed it?

A

False, a PersistentVolume is independent of the pod that uses the PV.

17
Q

What field of PersistentVolume controls the number of nodes that can mount the PersistentVolume for reading and writing?

A

accessMode

18
Q

What are the supported values of the accessMode field?

A

ReadWriteOnce
ReadOnlyMany
ReadWriteMany

19
Q

What is a Deployment

A

a higher-level controller that automates rolling updates of applications declaratively.

20
Q

What controls the automated updates of applications declaratively?

A

Deployments

21
Q

True or False: Replication Controllers are the prefered mechanism for deploying applications in Kubernetes?

A

False. Deployments are the prefered mechanism as they are a higher-level controller that automates rolling updates.

22
Q

True or False: Volumes must be explicitly claimed by pods?

A

False. Volumes do not require the use of claims. Simply including a volume in a Pod spec is enough to create and access the volume in the pod.

23
Q

True or False: Volumes, like persistent volumes, use claims to create?

A

False. Volumes can be created in a pod spec, however, the volume lifecycle ends with the pod.

24
Q

True or False: PersistentVolumes must be explicitly claimed by pods

A

True: PersistentVolumes must be claimed by pods using PersistentVolumeClaims.

25
Q

True or False: Both Volumes and PersistentVolumes can be accessed by all of the containers in the pod enclosing them.

A

True

26
Q

Two kubectl commands for collecting information about any active resource

A

get

describe

27
Q

True or False: Containers are a type of Kubernetes resource?

A

False

28
Q

Rolling update

A

Updates a service without an outage

29
Q

How do rolling updates work?

A

updates one pod at a time, rather than taking down the entire service at the same time.