---
title: "Discussion on \"Kubernetes - Inter-Pod Affinity And Anti-Affinity\" | Hashnode"
description: "Discussion on \"Kubernetes - Inter-Pod Affinity And Anti-Affinity\". Inter-pod affinity\ninter-pod affinity means that the pod wants to be on the same topology as the matching pod.\nspec:\n  affinity:\n    podAffinity:\n      requiredDuringSchedulingIgnoredDuringExecution:\n      - labelSelector:\n          matchExpressions:..."
url: "https://hashnode.com/posts/kubernetes-inter-pod-affinity-and-anti-affinity/66badbb6d453cb5eb7951510"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Kubernetes - Inter-Pod Affinity And Anti-Affinity](https://caoluc.hashnode.dev/kubernetes-inter-pod-affinity-and-anti-affinity?utm_source=hashnode&utm_medium=feed)

Inter-pod affinity inter-pod affinity means that the pod wants to be on the same topology as the matching pod. spec: affinity: podAffinity: requiredDuringSchedulingIgnoredDuringExecution: - labelSelector: matchExpressions:...

Aug 13, 2024 · 4 min read · caoluc.hashnode.dev  
Read the article

-   [#podaffinity](https://hashnode.com/tag/podaffinity)
-   [#podantiaffinity](https://hashnode.com/tag/podantiaffinity)

## Written by

[Luc Cao](https://hashnode.com/@caolucl)

@caolucl

  
[View profile](https://hashnode.com/@caolucl)

Technie

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
