# Scale up/down alpha nodes in a kubernetes environment

**URL:** <https://discuss.dgraph.io/t/scale-up-down-alpha-nodes-in-a-kubernetes-environment/17612>\
**Category:** Dgraph\
**Created:** [August 2, 2022, 9:34pm UTC](https://discuss.dgraph.io/t/scale-up-down-alpha-nodes-in-a-kubernetes-environment/17612 "2022-08-02T21:34:41Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jso](https://avatars.discourse-cdn.com/v4/letter/j/76d3ee/32.png) [@jso](https://discuss.dgraph.io/u/jso)\
**Post date:** [August 2, 2022, 9:34pm UTC](https://discuss.dgraph.io/t/scale-up-down-alpha-nodes-in-a-kubernetes-environment/17612/1 "2022-08-02T21:34:41Z")

</div>

Dgraph version: v20.11.3

I have a 3 alphas / 3 zeros cluster in a kubernetes environment. I want to repeatedly scale up/down the number of alpha nodes to test different load. All alpha nodes should be in the same group.

I have done the following to scale up:

- set “–replicas 5” in zero
- set “replicas: 5” in alpha  
This created id 4 & 5 in Group 1. Everything worked perfectly.

Then I scaled down alpha back to 3, and removed the id 4 & 5 using [http://zero-ip:6080/removeNode?id=4&group=1](http://zero-ip:6080/removeNode?id=4&group=1) [http://zero-ip:6080/removeNode?id=5&group=1](http://zero-ip:6080/removeNode?id=5&group=1)

When I tried to scale up again by setting “replicas: 5” in alpha, I got the following error.  
rpc error: code = Unknown desc = REUSE\_RAFTID: Duplicate Raft ID 4 to removed member: id:4 group\_id:1 addr:“dgraph-alpha-3.dgraph-alpha.dgraph.svc.cluster.local:7080”

Can someone help me how this can be done?

---

<div class="post-metadata">

**Author:** ![matthewmcneely](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/matthewmcneely/32/4774_2.png) [@matthewmcneely](https://discuss.dgraph.io/u/matthewmcneely)\
**Post date:** [August 3, 2022, 12:08am UTC](https://discuss.dgraph.io/t/scale-up-down-alpha-nodes-in-a-kubernetes-environment/17612/2 "2022-08-03T00:08:48Z")

</div>

Hey @jso,

Have you seen this: [https://dgraph.io/docs/v21.03/deploy/kubernetes/#removing-a-dgraph-pod](https://dgraph.io/docs/v21.03/deploy/kubernetes/#removing-a-dgraph-pod) ? Specifically the section that reads: “When a Zero pod restarts, it must join the existing group with an unused index ID”.
