Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

207
Views
Ejecutar dos pods de kubernetes en diferentes nodos

¿Hay alguna manera de decirle a Kubernetes que nunca ejecute dos pods en el mismo nodo? Por ejemplo, tengo dos réplicas de pods, quiero que estén siempre distribuidas en zone1/zone2 y nunca en la misma zona juntas.

 apiVersion: app/v1 kind: Deployment metadata: name: testApp labels: app: testApp-front namespace: spec: replicas: 2 selector: matchLabels: app: testApp-front template: metadata: labels: app: testApp-front spec: nodeSelector: failure-domain.beta.kubernetes.io/zone: zone1
over 4 years ago · Santiago Trujillo
3 answers
Answer question

0

Parece que se puede hacer con Interpod Affinity, puedes ver:

 apiVersion: apps/v1 kind: Deployment metadata: name: web-server spec: selector: matchLabels: app: testApp-front replicas: 3 template: metadata: labels: app: testApp-front spec: affinity: podAntiAffinity: requiredDuringSchedulingIgnoredDuringExecution: - labelSelector: matchExpressions: - key: app operator: In values: - testApp-front topologyKey: "kubernetes.io/hostname" podAffinity: requiredDuringSchedulingIgnoredDuringExecution: - labelSelector: matchExpressions: - key: app operator: In values: - store topologyKey: "kubernetes.io/hostname" containers: - name: web-testApp-front image: nginx:1.12-alpine

puedes ver el ejemplo completo aquí

over 4 years ago · Santiago Trujillo Report

0

Creo que necesitas el concepto de antiafinidad de pod. Esto está dentro de un clúster para asegurarse de que los pods no residan en un nodo trabajador. https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity

over 4 years ago · Santiago Trujillo Report

0

muy simple, puede usar el conjunto de demonios para ejecutar cada pod en un nodo diferente o, como dijeron los demás, puede usar la antiafinidad del pod

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!