DEV Community

Cheedge Lee
Cheedge Lee

Posted on • Edited on

CKA Quick Check Points -- Pod Schedual

This is a quick recap for the points of pod schedual, details can click each title link or the final reference.

1. Affinity

  • nodeAffinity and nodeAntiAffinity
    • node labels
  • podAffinity and podAntiAffinity
    • pod labels
  • requiredDuringSchedulingIgnoredDuringExecution and preferredDuringSchedulingIgnoredDuringExecution
  • topologyKey

2. nodeName/nodeSelector

spec:
  containers:
  - name: nginx
    image: nginx
    imagePullPolicy: IfNotPresent
  nodeSelector:
    disktype: ssd
---
spec:
  nodeName: foo-node # schedule pod to specific node
  containers:
  - name: nginx
    image: nginx
    imagePullPolicy: IfNotPresent
Enter fullscreen mode Exit fullscreen mode

3. Taint/Tolerations

CMD

k taint node NAME key[:value]:[EFFECT]
k describe node NAME | grep -i taint
Enter fullscreen mode Exit fullscreen mode

yaml

tolerations:
- key: "example-key"
  operator: "Exists"
  effect: "NoSchedule"
- key: "key1"
  operator: "Equal"
  value: "value1"
  effect: "NoExecute"
Enter fullscreen mode Exit fullscreen mode

4. Priority

The larger the higher

priorityclass

k get priorityclass
Enter fullscreen mode Exit fullscreen mode

yaml

spec:
  containers:
  - name: nginx
    image: nginx
    imagePullPolicy: IfNotPresent
  priorityClassName: high-priority
Enter fullscreen mode Exit fullscreen mode

Reference

Different way to assign Pods to Nodes
Assign Pods to Nodes
Pod Priority and Preemption

Image of Timescale

🚀 pgai Vectorizer: SQLAlchemy and LiteLLM Make Vector Search Simple

We built pgai Vectorizer to simplify embedding management for AI applications—without needing a separate database or complex infrastructure. Since launch, developers have created over 3,000 vectorizers on Timescale Cloud, with many more self-hosted.

Read full post →

Top comments (0)

Postmark Image

Speedy emails, satisfied customers

Are delayed transactional emails costing you user satisfaction? Postmark delivers your emails almost instantly, keeping your customers happy and connected.

Sign up