k8s part 4 Flashcards
what is a static pod ?
Static pods provide a way to run Kubernetes pods directly using the kubelet on a node.
what are taints and toleration?
- 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.
what are the components of taints and tolerations?
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
what is the command to taint a node ?
kubectl taint nodes [node name] key=value
what is the command to remove a taint from a node?
kubectl taint nodes [node name] key=value:NoSchedule-
what are some different ways you can influence the scheduling of a pod on a specific node?
- 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.
if a pod is stuck in pending mode, what could be the problem?
- wrong image
- wrong label on node selector
what is a sidecar patter?
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.
what is an ambassador pattern?
a type of sidecar pattern where the second container is primarily used to proxy requests.
what is an adapter pattern?
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.