此内容没有您所选择的语言版本。
Data Grid Operator Quickstart
Data Grid Documentation
Abstract
The Data Grid Operator provides operational intelligence and reduces management complexity for deploying Data Grid clusters on OpenShift.
Authors: Galder Zamarreño
Technologies: Data Grid, Operator, Kubernetes, OKD, Red Hat OpenShift
1. Storing and Retrieving Data on Data Grid Clusters
Prerequisites
Complete the procedures to create a Red Hat Data Grid cluster with the Data Grid Operator and then retrieve credentials for the application user. See the following topics in the Data Grid documentation:
Procedure
Expose the Data Grid service for external access.
$ oc expose svc example-rhdg
Create local variables for the public route and credentials.
Export the host for the public route to a local variable.
$ export DATAGRID_HOST=$(oc get route example-rhdg -o jsonpath="{.spec.host}")
Export the generated password from the secret to a local variable.
$ export PASS=$(oc get secret example-rhdg-app-generated-secret -o jsonpath="{.data.password}" | base64 --decode)
Store some data through the HTTP endpoint.
$ curl -v \ -X POST \ -u developer:${PASS} \ -H 'Content-type: text/plain' \ -d 'test-value' \ ${DATAGRID_HOST}/rest/default/test-key ... < HTTP/1.1 200 OK
Retrieve the data from the Data Grid cluster.
$ curl -v \ -u developer:${PASS} \ ${DATAGRID_HOST}/rest/default/test-key ... < HTTP/1.1 200 OK ... test-value