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
Q

How does the kubelet work (slightly more detail)

A

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
Q

What is the Topology Manager?

A

A component that allocates containers according to NUMA assignments.

27
Q

What does supervisord do?

A

In a non-systemd cluster, makes sure the kubelet and docker processes are running

28
Q

What does kube-proxy do?

A

Manages the network connectivity to all containers using iptables entries.

29
Q

What do you use for cluster wide logging?

A

Kube doesn’t have it built in, so use Fluentd

30
Q

How can you get cluster wide metrics?

A

SIG provides some basic node and pod CPU & memory stats, but Prometheus can provide more metrics.

31
Q

What are operators also known as?

A

Controllers or watch-loops

32
Q

What do Deployments manage?

A

replicaSets

33
Q

What are replicaSets?

A

Copies of pods running the same podSpec

34
Q

What does a service operator do?

A

Connects all the decoupled components

35
Q

What does a service operator do? (more detail)

A

Sends messages through the kube-apiserver, which forwards settings to kube-proxy on every node

36
Q

What does a service do?

A

Connect pods together
Expose pods to the internet
Decouples settings
Defines pod access policies

37
Q

What is the usual makeup of a pod?

A

One application container, and anciliary components

38
Q

What are common names for these ancilliary containers?

A

Sidecar, ambassador or adapter

39
Q

How can you choose the resources a container can consume?

A

The resources section of the PodSpec, or a ResourceQuota object

40
Q

What order do containers start in?

A

There is no order - they start in parallel

41
Q

How does an init container differ from a normal container?

A

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.