Software Containerisation

Table of Contents

Affinity and anti-affinity

Scheduler takes care of placing pods on nodes to consume cluster resources in reasonable way. But you can control how the scheduler does that by using labesls and selectors.

For example to:

Example:

apiVersion: v1
kind: Pod
metadata:
  name: nginx
  labels:
    env: test
spec:
  containers:
  - name: nginx
    image: nginx
  nodeSelector:
    size: large

Taints: features of Nodes allowing nodes to repel pods

Tolerations: allow specific pod to be scheduled on a node despite of its taint