How to deploy statefulset in EKS with more than one availability zone ?

0
  • My EKS cluster has three nodes. When I deploy my cluster with two availbility zone (ex us-west-1a, us-west-1b), one node is deployed in us-west-1a and another two nodes are deployed in us-west-1b.
  • I try to deploy statefulset that has 3 replicas and each pod has its own PVC. Because anti-affinity rule is 'hard', 3 pods are deployed in different node.
  • When I scale down all my instance then scale up thm, nodes are not deployed to same avaialblity zone. So, pod in statefulset cannot mount PV because PV is in different availbility zone from pod.
  1. Is there any method to deploy node in same availability zone when scaling down and up ?
  2. If not, is there any limitation that statefulset cannot be deploy across more than one avaialbility zone ?
hauk
asked 15 days ago117 views
1 Answer
0

Follow the steps outlined in the How do I create and troubleshoot topology aware volume provisioning that uses an EBS CSI driver in Amazon EKS knowledge center article to configure topology aware volume provisioning with the EBS CSI driver.

If you're using Karpenter, refer to the Scaling Kubernetes with Karpenter: Advanced Scheduling with Pod Affinity and Volume Topology Awareness blog post for detailed guidance on configuring topology aware volume provisioning.

This blog post explains how to leverage Karpenter's advanced scheduling features, including Pod Affinity and Volume Topology Awareness, to optimize your Kubernetes cluster's performance and resource utilization.

profile pictureAWS
answered 14 days ago
profile picture
EXPERT
reviewed 14 days ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions