Skip to content

Commit 81509a9

Browse files
terminalnodemnenciaNiccoloFei
authored
docs: update minio object store docs (#427)
The MinIO Gateway is deprecated as of 2022-02-24: https://blog.min.io/deprecation-of-the-minio-gateway/ These updated docs explain how to use MinIO's S3-compatible object storage without the need for setting up a dedicated gateway. Signed-off-by: Alexander Rundberg <[email protected]> Signed-off-by: Marco Nenciarini <[email protected]> Signed-off-by: Niccolò Fei <[email protected]> Co-authored-by: Marco Nenciarini <[email protected]> Co-authored-by: Niccolò Fei <[email protected]>
1 parent 70e12de commit 81509a9

File tree

2 files changed

+32
-70
lines changed

2 files changed

+32
-70
lines changed

.wordlist.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ apiVersion
5555
apiextensions
5656
args
5757
auth
58+
autocert
5859
aws
5960
backend
6061
backends

web/docs/object_stores.md

Lines changed: 31 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -384,87 +384,48 @@ write permissions to the bucket.
384384
---
385385

386386

387-
## MinIO Gateway
387+
## MinIO Object Store
388388

389-
MinIO Gateway can proxy requests to cloud object storage providers like S3 or GCS.
390-
For more information, refer to [MinIO official documentation](https://docs.min.io/).
389+
In order to use the Tenant resource you first need to deploy the
390+
[MinIO operator](https://docs.min.io/community/minio-object-store/operations/deployments/installation.html).
391+
For the latest documentation of MinIO, please refer to the
392+
[MinIO official documentation](https://docs.min.io/community/minio-object-store/).
391393

392-
### Setup
393-
394-
Create MinIO access credentials:
395-
396-
```sh
397-
kubectl create secret generic minio-creds \
398-
--from-literal=MINIO_ACCESS_KEY=<minio access key> \
399-
--from-literal=MINIO_SECRET_KEY=<minio secret key>
400-
```
394+
MinIO Object Store's API is compatible with S3, and the default configuration of the Tenant
395+
will create these services:
396+
- `<tenant>-console` on port 9090 (with autocert) or 9443 (without autocert)
397+
- `<tenant>-hl` on port 9000
398+
Where `<tenant>` is the `metadata.name` you assigned to your Tenant resource.
401399

402400
:::note
403-
Cloud Object Storage credentials will be used only by MinIO Gateway in this
404-
case.
405-
:::
401+
The `<tenant>-console` service will only be available if you have enabled the
402+
[MinIO Console](https://docs.min.io/community/minio-object-store/administration/minio-console.html).
406403

407-
Expose MinIO Gateway via `ClusterIP`:
408-
409-
```yaml
410-
apiVersion: v1
411-
kind: Service
404+
For example, the following Tenant:
405+
```yml
406+
apiVersion: minio.min.io/v2
407+
kind: Tenant
412408
metadata:
413-
name: minio-gateway-service
409+
name: cnpg-backups
414410
spec:
415-
type: ClusterIP
416-
ports:
417-
- port: 9000
418-
targetPort: 9000
419-
protocol: TCP
420-
selector:
421-
app: minio
411+
[...]
422412
```
413+
would have services called `cnpg-backups-console` and `cnpg-backups-hl` respectively.
423414

424-
Here follows an excerpt of an example of deployment relaying to S3:
415+
The `console` service is for managing the tenant, while the `hl` service exposes the S3
416+
compatible API. If your tenant is configured with `requestAutoCert` you will communicate
417+
to these services over HTTPS, if not you will use HTTP.
425418

426-
```yaml
427-
apiVersion: apps/v1
428-
kind: Deployment
429-
[...]
430-
spec:
431-
containers:
432-
- name: minio
433-
image: minio/minio:RELEASE.2020-06-03T22-13-49Z
434-
args: ["gateway", "s3"]
435-
ports:
436-
- containerPort: 9000
437-
env:
438-
- name: MINIO_ACCESS_KEY
439-
valueFrom:
440-
secretKeyRef:
441-
name: minio-creds
442-
key: MINIO_ACCESS_KEY
443-
- name: MINIO_SECRET_KEY
444-
valueFrom:
445-
secretKeyRef:
446-
name: minio-creds
447-
key: MINIO_SECRET_KEY
448-
- name: AWS_ACCESS_KEY_ID
449-
valueFrom:
450-
secretKeyRef:
451-
name: aws-creds
452-
key: ACCESS_KEY_ID
453-
- name: AWS_SECRET_ACCESS_KEY
454-
valueFrom:
455-
secretKeyRef:
456-
name: aws-creds
457-
key: ACCESS_SECRET_KEY
458-
# Uncomment the below section if session token is required
459-
# - name: AWS_SESSION_TOKEN
460-
# valueFrom:
461-
# secretKeyRef:
462-
# name: aws-creds
463-
# key: ACCESS_SESSION_TOKEN
419+
For authentication you can use your username and password, or create an access key.
420+
Whichever method you choose, it has to be stored as a secret.
421+
422+
```sh
423+
kubectl create secret generic minio-creds \
424+
--from-literal=MINIO_ACCESS_KEY=<minio access key or username> \
425+
--from-literal=MINIO_SECRET_KEY=<minio secret key or password>
464426
```
465427

466-
Proceed by configuring MinIO Gateway service as the `endpointURL` in the
467-
`ObjectStore` definition, then choose a bucket name to replace `BUCKET_NAME`:
428+
Finally, create the Barman ObjectStore:
468429

469430
```yaml
470431
apiVersion: barmancloud.cnpg.io/v1
@@ -474,7 +435,7 @@ metadata:
474435
spec:
475436
configuration:
476437
destinationPath: s3://BUCKET_NAME/
477-
endpointURL: http://minio-gateway-service:9000
438+
endpointURL: http://<tenant>-hl:9000
478439
s3Credentials:
479440
accessKeyId:
480441
name: minio-creds

0 commit comments

Comments
 (0)