Chapter 12. Accessing the RADOS Object Gateway S3 endpoint
Chapter 12. Accessing the RADOS Object Gateway S3 endpoint Users can access the RADOS Object Gateway (RGW) endpoint directly. Prerequisites A running OpenShift Data Foundation Platform Procedure Run oc get service command to get the RGW service name. Run oc expose command to expose the RGW service. Replace <RGW-service name> with the RGW service name from the step. Replace <route name> with a route you want to create for the RGW service. For example: Run oc get route command to confirm oc expose is successful and there is an RGW route. Example output: Verification To verify the ENDPOINT , run the following command: Replace <ENDPOINT> with the route that you get from the command in step 3. For example: Important To get the access key and secret of the default user ocs-storagecluster-cephobjectstoreuser , run the following commands: Access key: Secret key:
oc get service -n openshift-storage NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE (...) rook-ceph-rgw-ocs-storagecluster-cephobjectstore ClusterIP 172.30.145.254 <none> 80/TCP,443/TCP 5d7h (...) oc expose svc/<RGW service name> --hostname=<route name> oc expose svc/rook-ceph-rgw-ocs-storagecluster-cephobjectstore --hostname=rook-ceph-rgw-ocs.ocp.host.example.com oc get route -n openshift-storage NAME HOST/PORT PATH rook-ceph-rgw-ocs-storagecluster-cephobjectstore rook-ceph-rgw-ocs.ocp.host.example.com SERVICES PORT TERMINATION WILDCARD rook-ceph-rgw-ocs-storagecluster-cephobjectstore http <none> aws s3 --no-verify-ssl --endpoint <ENDPOINT> ls aws s3 --no-verify-ssl --endpoint http://rook-ceph-rgw-ocs.ocp.host.example.com ls oc get secret rook-ceph-object-user-ocs-storagecluster-cephobjectstore-ocs-storagecluster-cephobjectstoreuser -n openshift-storage -o yaml | grep -w "AccessKey:" | head -n1 | awk '{print USD2}' | base64 --decode oc get secret rook-ceph-object-user-ocs-storagecluster-cephobjectstore-ocs-storagecluster-cephobjectstoreuser -n openshift-storage -o yaml | grep -w "SecretKey:" | head -n1 | awk '{print USD2}' | base64 --decode