Remove Cache Servers
You can also remove a cache server from the cache cluster at runtime using OpenShift web portal and command line tool. In order to do that, first remove server nodes from the cache cluster, using NCache Manager.
Using OpenShift Portal
Go to the Deployments section under the Workloads tab.
On this page, click on the options button against the deployment name (which is ncache in this case).
- Clicking on the Edit Count button lets you decrease the number of replica pods in your cache cluster. Click on the - button to decrease the replica count.
Using Command Line Tool
To decrease the pods' replica count through OpenShift command line tool, run the following command.
Here the name of the server side deployment is ncache as created previously.
oc scale deployments/ncache --replicas number_of_remaining_server_nodes
Manually Editing Configuration File
You can also edit the ncache.yaml file containing the server side deployments.
In the YAML file containing the deployments,under the
spectag against the
replicas, mention the number of replicas according to the requirement.
Run the following command after modifying the YAML file.
oc apply -f ncache.yaml
Remove Server Nodes from Cache
Access NCache Web Manager from the Location tab in the Routes section.
Follow the steps mentioned in Remove Server Node in order to remove server node.
On successful removal of cache servers, verify through Web Manager or Monitor.
After successful removal of server nodes from the cache through Web Manager, you need to remove the cache servers from your deployments in order to synchronize the changes. Following are the ways to do this.