Decommission a node in AWS EKS
This guide describes a recommended workflow for decommissioning a Portworx node in your cluster.
The following steps don't apply if you're using an auto-scaling group (ASG) to manage your Portworx nodes. For details about how you can change the size of your auto-scaling group, see the Scaling the Size of Your Auto Scaling Group page of the AWS documentation.
Migrate application pods using Portworx volumes that are running on this node
If you plan to remove Portworx from a node, applications running on that node using Portworx need to be migrated. If Portworx is not running, existing application containers will end up with read-only volumes and new ones will fail to start.
Perform the following steps to migrate select pods.
-
Cordon the node using the following command:
kubectl cordon <node> -
Reschedule application pods using Portworx volumes on different nodes:
kubectl delete pod <pod-name> -n <application-namespace>Since application pods are expected to be managed by a controller like
DeploymentorStatefulSet, Kubernetes will spin up a new replacement pod on another node.
Decommission Portworx
To decommission Portworx, perform the following steps.
Remove Portworx installation from the node
Apply the px/enabled=remove label and it will remove the existing Portworx systemd service. It will also apply the px/enabled=false label to stop Portworx from running in future.
For example, below command will remove existing Portworx installation from minion2 and also ensure that Portworx pod doesn’t run there in future.
kubectl label nodes < node > px/enabled=remove --overwrite
Decommission from Kubernetes: If the plan is to decommission this node altogether from the Kubernetes cluster, no further steps are needed.