How does PV and PVC get migrated while moving AKS statefulset workload to another nodepool

Ninad Desai 26 Reputation points
2022-01-17T18:09:23.42+00:00

Context: [Regarding cost reduction for compute]. In AKS cluster, recently observed that compute resources are under-utilised and so my plan is:

To create a new node pool(with lower cpu and memory, and so lower cost basically) and attach to the same AKS cluster. And then

cordon the old node pool and then drain it, so the workload will move to new node pool (Thanks to nodeSelector)

Question:

What about the k8s resources like statefulset for eg. Redis etc which are in old node pool and are having PV and PVC . Do we have to take backup of those pvc and restore etc for new node pool? (As per my thinking, kubernetes will take care of detaching and attaching pvc considering all this activity will be within single kubernetes cluster only)

Azure Kubernetes Service (AKS)
Azure Kubernetes Service (AKS)
An Azure service that provides serverless Kubernetes, an integrated continuous integration and continuous delivery experience, and enterprise-grade security and governance.
2,221 questions
0 comments No comments
{count} vote

Accepted answer
  1. Prrudram-MSFT 27,576 Reputation points
    2022-01-18T09:28:19.863+00:00

    Hello @Ninad Desai ,

    You are right! Kubernetes will take care of detaching and attaching PV and PVC considering all this activity will be within single Kubernetes cluster only. You don’t need to backup.

    (If the response was helpful please don't forget to upvote and/or accept as answer, thank you)


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.