Create Management Gateway in Openshift
The creation of cache management gateway is solely for the purpose of managing and monitoring NCache deployments outside the Kubernetes cluster. Any management operation performed would be routed through this management gateway to the cache discovery service and that would result in allowing you to monitor all the underlying pods.
In order to create the route, create a YAML file with the configurations. Given below is a sample YAML file to create a route.
kind: Route
apiVersion: route.openshift.io/v1
metadata:
name: ncache
labels:
app: cacheserver
spec:
to:
kind: Service
name: cacheserver
port:
targetPort: management-http
Using Web Portal in OpenShift
Go to the Networking section from the OpenShift portal.
Select Routes from the drop-down menu.
Create a route to the headless service a.k.a Cache Discovery Service.
- Provide a name for the route and select the service with the name cacheserver created previously. Along with that, provide the target port 8251 for management and monitoring outside the Kubernetes cluster.
- Route will be created successfully.
Using Command Line
- In order to create the route using command line tool, create a YAML file with the configurations. Given below is a sample YAML file to create a route.
kind: Route
apiVersion: route.openshift.io/v1
metadata:
name: ncache
labels:
app: cacheserver
spec:
to:
kind: Service
name: cacheserver
port:
targetPort: management-http
- Once created, run the following command in the command line tool to create the route.
oc create -f route.yaml
- In order to verify successful creation of the route, run the following command.
oc get routes
After successful management gateway, you need to create NCache cache cluster, explained in the next chapter.
See Also
Create New Project in Openshift
Create Cache Discovery Service in Openshift
Create Management Gateway in Openshift
Create NCache Cluster in Openshift