Removing Cache Server(s) in Amazon EKS at Runtime
To remove a cache server from an Amazon EKS cluster at runtime, first stop the cache on the target node and remove it using the NCache Management Center or PowerShell. Following this, scale down the Kubernetes deployment replica count to ensure the physical environment is synchronized with the logical cluster.
Important
Stop cache on the node(s) that need to be removed. You can stop cache on any node through the NCache Management Center or the NCache PowerShell Tool.
There are two ways through which you can remove cache servers at runtime. They are:
How to Remove Cache Server Nodes from the NCache Cluster
Cache servers can be removed from an NCache cluster through the following ways:
Follow these steps to remove cache servers through the NCache Management Center.
- Access the NCache Management Center from the ingress URL as shown before.
- Go to Remove Server Nodes through the NCache Management Center and follow the steps mentioned there to remove cache servers from the cluster.
To remove cache servers through PowerShell, follow the steps mentioned in Remove Server Nodes through PowerShell.
Updating Amazon EKS Replica Count after Node Removal
After you have removed the required node(s) from the cluster, you need to decrease the replica count in the NCache deployment pod so that the changes made are in sync with each other.
Follow these steps to decrease the replica count in the deployment file.
Execute this command in the command line interface to decrease the number of replicas in the deployment.
kubectl scale --replicas=number_of_remaining_server_nodes deployment ncachedeployment.yamlThe number of replicas can also be decreased from the created YAML file ncachedeployment.yaml.
- Open ncachedeployment.yaml and update the
replicascount under thespectag according to your requirement. - After the YAML file has been modified, run the following command in the command line tool to apply the changes made to the deployment.
batchfile kubectl apply -f [dir]/ncachedeployment.yaml
- Open ncachedeployment.yaml and update the
After removing the required cache servers from the cluster, you can verify these changes from the NCache Management Center. You can also monitor the cluster and checks its stats. See Monitor NCache Cluster and Clients for more details.
See Also
Create Cache Cluster in Amazon EKS
Monitor NCache Cluster and Clients in Amazon EKS
Adding Cache Servers in Amazon EKS at Runtime