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
已提问 1 个月前145 查看次数
1 回答
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
已回答 1 个月前
profile picture
专家
已审核 1 个月前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则