k8s part 4 Flashcards

1
Q

what is a static pod ?

A

Static pods provide a way to run Kubernetes pods directly using the kubelet on a node.

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

what are taints and toleration?

A
  • Taints are markers or labels used to repel a pod from a specific node.
  • Tolerations are like permissions or allowances that pods can have in order to run on a node that has a taint.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

what are the components of taints and tolerations?

A

key: any string up to 253 characters
value: any string up to 63 characters
effect: NoSchedule : new pods that don’t match the taint are not welcomed
PreferNoschedule: new pods might be scheduled, but scheduler tries not to
NoExecute : new pods are not welcomed, existing pods that do not have toleration are removed.
Operator: Equal the key/value/effect parameters must match. This is the default
Exist the key/effect must match, you don’t need the value parameter

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

what is the command to taint a node ?

A

kubectl taint nodes [node name] key=value

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

what is the command to remove a taint from a node?

A

kubectl taint nodes [node name] key=value:NoSchedule-

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

what are some different ways you can influence the scheduling of a pod on a specific node?

A
  • node name : This is a unique name assigned to each node within the Kubernetes cluster.
  • node selector: a node selector is a simple way to constrain which nodes a pod can be scheduled on using labels
  • node affinity: used to influence the scheduling of pods onto nodes based on labels assigned to nodes. They have more features than node selectors
    -node anti affinity: opposite of node affinity
  • pod affinity : Pod affinity in Kubernetes is a way to tell the system how pods should be grouped together or spread apart across nodes in the cluster. It helps control where Kubernetes schedules pods based on their relationships with other pods or labels on nodes.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

if a pod is stuck in pending mode, what could be the problem?

A
  • wrong image
  • wrong label on node selector
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

what is a sidecar patter?

A

It involves deploying a separate container (the sidecar) alongside the main application container within the same Pod

The sidecar container extends and enhances the functionality of the main container without modifying it

This pattern is useful for adding features such as logging, monitoring, configuration, and communication management.

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

what is an ambassador pattern?

A

a type of sidecar pattern where the second container is primarily used to proxy requests.

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

what is an adapter pattern?

A

An adapter container in Kubernetes is like a translator that helps different containers within the same pod talk to each other by converting their messages into a format they can understand.

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