return FALSE; $r = well_tag_thread__update(array('id' => $id), $update); return $r; } function well_tag_thread_find($tagid, $page, $pagesize) { $arr = well_tag_thread__find(array('tagid' => $tagid), array('id' => -1), $page, $pagesize); return $arr; } function well_tag_thread_find_by_tid($tid, $page, $pagesize) { $arr = well_tag_thread__find(array('tid' => $tid), array(), $page, $pagesize); return $arr; } ?>kubernetes - How to Prevent PostgreSQL Pod Restart on GKE Node Autoscaling? - Stack Overflow
最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

kubernetes - How to Prevent PostgreSQL Pod Restart on GKE Node Autoscaling? - Stack Overflow

programmeradmin1浏览0评论

I'm running a Kubernetes cluster on GKE with autoscaling enabled. My workloads are running fine, but I have an issue with my PostgreSQL database, which is deployed as a StatefulSet with a single replica.

The Problem:

Whenever GKE adds a new node, my PostgreSQL pod restarts due to rescheduling. Since it has a high data volume, the restart process takes a long time, affecting application performance.

Using PodDisruptionBudgets (PDB), but since I have only one replica, it doesn't fully prevent eviction.

Setting node affinity, but this limits autoscaling flexibility.

Checking for persistent volume stability, but my storage remains intact.

How can I prevent my PostgreSQL pod from restarting when GKE autoscaling adds nodes?

Are there any Kubernetes-native mechanisms to handle this better?

What are the best practices for managing stateful workloads with autoscaling?

Would appreciate any insights from the community!

发布评论

评论列表(0)

  1. 暂无评论