Kubernetes Architecture Flashcards

1
Q

How does a Kubernetes cluster operate?

A

API calls to operators. Most things run in containers.

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

What should you do to make sure that a Kubernetes upgrade will work?

A

Make sure that all components will work together

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

How do you make sure all versions will work together?

A

Run kubeadm upgrade plan

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

What does the control plane do?

A

Run server and management processes.

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

What did the cloud-controller-manager replace?

A

kube-controller-manager

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

What’s an example of an essential Kubernetes add-on?

A

DNS services

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

What are some optional Kubernetes add-ons?

A

Cluster logging and resource monitoring

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

What usually manages the kubelet process?

A

systemd, when the cluster is built using kubeadm

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

Which pods get started when a cluster starts?

A

Those in /etc/kubernetes/manifests/

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

What does kube-apiserver do?

A

Handle and validate API calls, and connect to the etcd cluster

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

What does the Konnectivity service do?

A

Allows the separation of user and server initiated traffic.

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

What’s the advantage of segregating user and server initiated traffic?

A

Reduced performance, capacity and security concerns

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

What does kube-scheduler do?

A

Uses an algorithm to decide which node will host a pod

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

In order, what does kube-scheduler evaluate to decide where to place a pod?

A

Quota restrictions
Taints and tolerations
Labels and metadata

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

What does the etcd database store?

A

Cluster state, networking and persistent information

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

How do values get updated in etcd?

A

Values get appended to the end of the database, and old values are removed when compaction runs

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

What happens if there are simultaneous requests to update a value in etcd?

A

The first one will succeed, but the others will fail with a 409 error.

18
Q

What happens when you get a 409 error?

A

Nothing, the client has to make another request.

19
Q

What do you have to do before doing an etcd update?

A

Back up the cluster’s etcd state

20
Q

How do you back up an etcd state?

A

Run etcdctl snapshot save or etcdctl snapshot restore

21
Q

What does the kube-controller-manager agent do?

A

Keep track of the state of the cluster, and use controllers to get the states to match

22
Q

What does CCM do?

A

Interact with agents outside of the cloud, like public cloud providers, to create things like load balancers.

23
Q

What processes do all Kube nodes run?

A

kubelet, kube-proxy and a container engine

24
Q

What does the kubelet do?

A

Interact with the container engine on the nodes and make sure all required containers are running

25
How does the kubelet work (slightly more detail)
Takes in API calls for pod specifications and configures the node until the spec has been met. Includes provisioning access to storage, Secrets or ConfigMaps.
26
What is the Topology Manager?
A component that allocates containers according to NUMA assignments.
27
What does supervisord do?
In a non-systemd cluster, makes sure the kubelet and docker processes are running
28
What does kube-proxy do?
Manages the network connectivity to all containers using iptables entries.
29
What do you use for cluster wide logging?
Kube doesn't have it built in, so use Fluentd
30
How can you get cluster wide metrics?
SIG provides some basic node and pod CPU & memory stats, but Prometheus can provide more metrics.
31
What are operators also known as?
Controllers or watch-loops
32
What do Deployments manage?
replicaSets
33
What are replicaSets?
Copies of pods running the same podSpec
34
What does a service operator do?
Connects all the decoupled components
35
What does a service operator do? (more detail)
Sends messages through the kube-apiserver, which forwards settings to kube-proxy on every node
36
What does a service do?
Connect pods together Expose pods to the internet Decouples settings Defines pod access policies
37
What is the usual makeup of a pod?
One application container, and anciliary components
38
What are common names for these ancilliary containers?
Sidecar, ambassador or adapter
39
How can you choose the resources a container can consume?
The resources section of the PodSpec, or a ResourceQuota object
40
What order do containers start in?
There is no order - they start in parallel
41
How does an init container differ from a normal container?
They must be running before standard containers will start They can contain code or utilities that aren't in an app (like a shell command). They have independent security from app containers.