Removing Cache Server(s) in Azure AKS 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 Azure AKS cluster.
Follow the steps provided below to remove cache servers in your Azure Kubernetes cluster at runtime.
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.
Removing cache server(s) from NCache cluster in Azure AKS
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 [gatewayIPAddress]:8251
- 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 the following command in the Azure Cloud Shell to decrease the number of replicas in the deployment.
kubectl scale --replicas=number_of_remaining_server_nodes deployment/ncache
- You can also decrease the number of replicas from the created YAML file ncache.yaml.
- Open ncache.yaml in a Notepad and update
replicas
count under thespec
tag according to your requirement. - After the YAML file has been modified, run the following command in Azure Cloud Shell to apply the changes made to the deployment.
- Open ncache.yaml in a Notepad and update
kubectl apply -f [dir]/ncache.yaml
After required cache servers have been removed from the cache cluster, you can view these changes from the NCache Management Center. You can also monitor the cluster and checks its stats. See Monitor NCache Cluster and Clients
See Also
Create Cache Cluster in Azure AKS
Monitor NCache Cluster and Clients in Azure AKS
Adding Cache Servers in Azure AKS at Runtime