Pods Flashcards

1
Q

How many container probes are there and which are they?

A

3, livelinessProbe, readinessProbe, startupProbe
the livelinessProbe checks if the application is healthy if not the resource is restarted,
the readinessProbe checks if the application is ready to receive traffic if not requests are not send to it,
the startupProbe prevents other probes from being checked until the application as started usefull for slow starting applications.

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

What does the livelinessProbe checks?

A

Checks if a container needs to be restarted

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

What does the readinessProbe check?

A

Checks if a container is ready to accept traffic

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

What does the startupProbe check?

A

Checks if the application has started and if the other probes can start to run

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

What kubernetes component runs probes?

A

The kubelet component

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

How many check mechanisms are there and which are they?

A

exec, httpGet, grpc, tcp, tcpSocket

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

What are the common configuration options for probes?

A

initialDelaySeconds, timeoutSeconds, periodSeconds, failureThreshold

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

What is the difference between requested memory and cpu and limit memory and cpu?

A

Requested is the minimum viable amount of memory or cpu, whilst limit is the maximum

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

write the spec part of a pod that needs to run the following command: “sh -c ‘while sleep 3600; do :; done’”

A

spec:
containers:
- name: pod
image: nginx
args:
- sh
- -c
- ‘while sleep 3600;do :; done’
resources:
requests:
cpu: 1
memory: 250Mi
limits:
cpu: 2.5
memory: 300Mi

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