How to avoid other pods from being scheduled on your node in Kubernetes

Kubernetes is a powerful platform for managing containerized applications across a cluster of nodes. However, sometimes you may want to have more control over which pods are scheduled on which nodes, for various reasons such as performance, security, or cost.

What are taints and tolerations?#

Taints and tolerations are a feature of Kubernetes that allow you to mark nodes with certain attributes or conditions, and then specify which pods can or cannot be scheduled on those nodes based on those attributes or conditions. Taints are applied to nodes, and tolerations are applied to pods.

Kubernetes Tolerations

Kubernetes tolerations are a way of allowing pods to be scheduled on nodes that have taints, which are markers that repel pods by default. Tolerations let you control which pods can run on which nodes, based on the pod’s requirements and the node’s characteristics.

What are Kubernetes tolerations?#

Kubernetes tolerations are a pod property that allow a pod to be scheduled on a node with a matching taint. Taints are the opposite of node affinity, which is a way of attracting pods to a set of nodes. Taints are applied to nodes and act as a repelling barrier against new pods. Tainted nodes will only accept pods that have been marked with a corresponding toleration.

How to erase line in files containing string recursively in Linux

find . -name "*.md" -type f -exec sed -i '/line of text/d' {} \;

This command uses find to locate all .md files in the current directory and its subdirectories recursively. The -exec option is used to execute the sed command on each file found. The {} is replaced by the name of each file found, and the \; is used to terminate the -exec option.

The sed command removes any line containing the string “line of text” from each file found.