|
| 1 | +// Module is included in the following assemblies: |
| 2 | +// |
| 3 | +// * installing/installing-the-loki-operator.adoc |
| 4 | + |
| 5 | +:_mod-docs-content-type: PROCEDURE |
| 6 | +[id="creating-the-loki-object-storage-secret_{context}"] |
| 7 | += Creating the object storage secret |
| 8 | + |
| 9 | +[role="_abstract"] |
| 10 | +Create a secret with the credentials for your S3-compatible object store. The {loki-op} requires this secret to configure the `LokiStack` to store log data. |
| 11 | + |
| 12 | +.Procedure |
| 13 | + |
| 14 | +. Create a `Secret` object with your object storage credentials: |
| 15 | ++ |
| 16 | +.Example `Secret` object for {aws-short} S3 |
| 17 | +[source,yaml] |
| 18 | +---- |
| 19 | +apiVersion: v1 |
| 20 | +kind: Secret |
| 21 | +metadata: |
| 22 | + name: logging-loki-s3 |
| 23 | + namespace: openshift-logging |
| 24 | +stringData: |
| 25 | + access_key_id: <your_access_key_id> |
| 26 | + access_key_secret: <your_secret_access_key> |
| 27 | + bucketnames: <your_bucket_name> |
| 28 | + endpoint: <your_s3_endpoint> |
| 29 | + region: <your_region> |
| 30 | +---- |
| 31 | ++ |
| 32 | +`metadata.name`:: Use the name `logging-loki-s3` to match the reference in the `LokiStack` CR. |
| 33 | +`metadata.namespace`:: You must create this secret in the `openshift-logging` namespace. |
| 34 | +`access_key_id`:: Your S3 access key ID. |
| 35 | +`access_key_secret`:: Your S3 secret access key. |
| 36 | +`bucketnames`:: The name of a pre-created S3 bucket, for example `loki`. |
| 37 | +`endpoint`:: The full endpoint URL. For {aws-short}: `\https://s3.<region>.amazonaws.com`. For in-cluster MinIO: `\http://minio.openshift-logging.svc:9000`. |
| 38 | +`region`:: The S3 region, for example `us-east-1`. |
| 39 | ++ |
| 40 | +[NOTE] |
| 41 | +==== |
| 42 | +The field names `access_key_id`, `access_key_secret`, `bucketnames`, and `endpoint` are specific to the {loki-op}. They do not match the standard {aws-short} SDK environment variable names. |
| 43 | +==== |
| 44 | + |
| 45 | +. Apply the `Secret` object by running the following command: |
| 46 | ++ |
| 47 | +[source,terminal] |
| 48 | +---- |
| 49 | +$ oc apply -f <filename>.yaml |
| 50 | +---- |
0 commit comments