Deploy NCache with OpenShift
NCache can be deployed on an existing OpenShift cluster using the unified NCache Helm chart. The chart configures NCache server containers on Linux worker nodes and creates gateway services for client connections and management access.
This page describes the permissions and networking required for the deployment, followed by the steps to install and verify NCache. The examples use the default two-server configuration.
Prerequisites
Before you begin, make sure that:
- You have access to an existing OpenShift cluster, or permission to create one as described below.
- Your Kubernetes client and Helm are configured for the intended cluster and namespace.
- You have permission to install namespace resources and cluster-wide RBAC resources, and to grant the chart’s service account the
anyuidsecurity context constraint. - The chart and container image are supported by the cluster's security policies.
- The selected NCache chart version is accessible.
- You have the required deployment key and any applicable licensing information.
- The cluster provides gateway connectivity and the resources needed by the deployment.
- The cluster must run Kubernetes version
1.25.0or later and provide at least two schedulable Linux worker nodes for the default two-server deployment. The default setting,deployment.podAntiAffinity=true, places each server on a separate node. If shared-node placement is acceptable, this value can be set tofalseduring installation.
Create an OpenShift Cluster
If you do not already have an OpenShift cluster, install OpenShift Container Platform using the installation method appropriate for your infrastructure. For physical servers or virtual machines, the Red Hat Assisted Installer provides a guided installation process.
- Create a cluster in the Assisted Installer and specify its name, base domain, and OpenShift version.
- Generate the discovery image and use it to boot the machines that will join the cluster.
- Assign the control-plane and worker roles according to the selected cluster topology. Provide at least two schedulable Linux worker nodes for the default two-server NCache deployment, in addition to the required control-plane capacity.
- Complete the network configuration, resolve any host validation issues, and start the installation.
- After installation completes, download the cluster's Kubernetes configuration file for use in the following connection procedure. Ensure that the cluster provides a load balancer for the NCache gateway services before installing the Helm chart.
Deployment Process
Follow the steps below to deploy NCache on an existing OpenShift cluster.
Step 1: Connect kubectl to OpenShift
- Use the cluster access configuration supplied by your OpenShift administrator and verify that it targets the intended cluster:
kubectl config current-context
kubectl get nodes
Step 2: Prepare the NCache Helm Chart
- Inspect the selected NCache chart's defaults:
helm show values oci://registry-1.docker.io/alachisoft/ncache --version 1.0.0
Step 3: Install Helm Chart
Run the following command to deploy two NCache servers with defaultCache enabled. Replace xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx with your deployment key:
helm install ncache oci://registry-1.docker.io/alachisoft/ncache --version 1.0.0 --namespace ncache --create-namespace \
--set-string deployment.key="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
--set-string deployment.platform="OpenShift"
Tip
For guidance on deploying in different scenarios, refer to Manage an Existing Deployment.
Verify the Server Pods
Check the pods and their worker-node placement after installation:
kubectl get pods,jobs -n ncache
kubectl get pods -n ncache -o wide
After Helm installs the release, NCache completes cache configuration and licensing through a configuration job. Check for failed jobs and verify the caches in NCache Management Center before using the deployment.
Verify that all configured NCache server pods are ready; the default deployment contains two. If a pod fails to start, inspect its events and logs using its actual name, and check the deployment key, licensing values, and access to the selected image.
Step 4: Verify NCache Services
- Check the server pods and gateway services:
kubectl get pods -n ncache -o wide
kubectl get svc -n ncache
Verify the endpoints and ports supplied by the chart:
- Client connections:
gateway.clientPortdefaults to9800. - Management:
gateway.mgmtPortsdefaults to9801-9802, with session affinity. - Additional gateway ports:
gateway.portsdefaults to9803-9997. - Portal:
gateway.portalPortsdefaults to9998-9999, with session affinity.
Verify that the assigned gateway endpoints are reachable. The management and portal port assignments are described below.
Step 5: Access NCache Management Center
Use the gateway's external IP address or DNS name to access the NCache Management Center. The default direct-access URLs are http://<management-gateway-endpoint>:9801 and, when HTTPS is configured, https://<management-gateway-endpoint>:9802.
When accessing Management Center through an HTTPS load balancer, use the configured public HTTPS endpoint and forward requests to HTTP port 9801 with sticky sessions enabled. For the NCache Cloud Portal, which uses HTTPS port 9998 and HTTP port 9999, configure the HTTPS load balancer to forward requests to HTTP port 9999 with sticky sessions enabled. These port assignments are described in Firewalls and Ports.
After verifying the deployed caches in NCache Management Center, follow Getting Started to begin using NCache. Applications outside Kubernetes can connect through the client gateway using ConnectionOptions, as described in Configure the External Client. For subsequent licensing changes, cache configuration updates, and image upgrades, see Manage Deployment.
See Also
Kubernetes Self-Deployment
Deploy TLS With NCache Kubernetes