# Soft vs. Hard Affinity

> What is the difference between requiredDuringSchedulingIgnoredDuringExecution and preferredDuringSchedulingIgnoredDuringExecution in Kubernetes affinity...

Canonical: https://www.internhack.in/learn/interview/kubernetes-orchestration/k8s-affinity-soft-hard
Last updated: 2026-11-28

Difficulty: Advanced

## Question

What is the difference between requiredDuringSchedulingIgnoredDuringExecution and preferredDuringSchedulingIgnoredDuringExecution in Kubernetes affinity rules?

*The full answer is for InternHack members. Open the page link above to read it.*

## Concepts covered

Node Affinity, requiredDuringSchedulingIgnoredDuringExecution, preferredDuringSchedulingIgnoredDuringExecution, Scheduler Scoring, matchExpressions

Previous: [Init Containers](https://www.internhack.in/learn/interview/kubernetes-orchestration/k8s-init-containers) · Next: [Metrics Server](https://www.internhack.in/learn/interview/kubernetes-orchestration/k8s-metric-server-role) · [All of Kubernetes & Orchestration](https://www.internhack.in/learn/interview/kubernetes-orchestration)

## More Kubernetes & Orchestration questions

- [Checking Resource Usage](https://www.internhack.in/learn/interview/kubernetes-orchestration/k8s-kubectl-top)
- [Pod Eviction](https://www.internhack.in/learn/interview/kubernetes-orchestration/k8s-pod-eviction)
- [PVC Access Modes](https://www.internhack.in/learn/interview/kubernetes-orchestration/k8s-pvc-access-modes)
- [Secret Security](https://www.internhack.in/learn/interview/kubernetes-orchestration/k8s-secret-security)
- [PodPresets (Legacy)](https://www.internhack.in/learn/interview/kubernetes-orchestration/k8s-pod-preset)
- [API Groups](https://www.internhack.in/learn/interview/kubernetes-orchestration/k8s-api-groups)

## Related

- [Learn](https://www.internhack.in/learn)
- [Interview Prep](https://www.internhack.in/learn/interview)
- [Kubernetes & Orchestration](https://www.internhack.in/learn/interview/kubernetes-orchestration)
