<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Affinity :: Tag :: Kubernetes training</title><link>https://k8s-school.fr/labs/k8s/en/tags/affinity/index.html</link><description/><generator>Hugo</generator><language>en</language><copyright>Copyright (c) 2025 Fabrice Jammes - Licensed under CC BY-SA 4.0</copyright><lastBuildDate>Thu, 06 Jun 2024 14:15:26 +1000</lastBuildDate><atom:link href="https://k8s-school.fr/labs/k8s/en/tags/affinity/index.xml" rel="self" type="application/rss+xml"/><item><title>Pod Anti Affinity</title><link>https://k8s-school.fr/labs/k8s/en/1_labs/antiaffinity/index.html</link><pubDate>Thu, 06 Jun 2024 14:15:26 +1000</pubDate><guid>https://k8s-school.fr/labs/k8s/en/1_labs/antiaffinity/index.html</guid><description>Create a nginx deployment with 3 pods Solution apiVersion: apps/v1 kind: Deployment metadata: name: nginx spec: replicas: 3 selector: matchLabels: app: nginx template: metadata: labels: app: nginx spec: containers: - name: nginx image: gcr.io/google_containers/nginx-slim:0.9 ports: - containerPort: 8080 Add a ‘podAntiAffinity’ section to the deployment The goal is to distribute all pod for this deployment across different nodes.</description></item></channel></rss>