Removing Cache Server(s) in Amazon EKS at Runtime
In case you need to remove a cache server from the cache cluster at runtime, you can do so by using NCache management tools and NCache deployment in Amazon EKS cluster.
Important
Stop cache on the node(s) that needs to be removed. You can stop cache on any node through NCache Management Center or NCache PowerShell Tool.
There are two ways through which you can remove cache servers at runtime. They are:
Removing cache server(s) from NCache cluster in Amazon EKS
Cache servers can be removed from an NCache cluster through the following ways:
Follow these steps to remove cache servers through NCache Management Center.
- Access NCache Management Center from the ingress URL as shown before.
- Go to Remove Server Nodes through 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.
Removing cache server(s) from deployment
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 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.yaml
The number of replicas can also be decreased from the created YAML file ncachedeployment.yaml.
- Open ncachedeployment.yaml and update
replicas
count under thespec
tag according to your requirement. - After the YAML file has been modified, run the following command in command line tool to apply the changes made to the deployment.
batchfile kubectl apply -f [dir]/ncachedeployment.yaml
- Open ncachedeployment.yaml and update
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