MinIO Server

MinIO | High Performance, Kubernetes Native Object Storage

Multi-cloud object storage allows enterprises to build AWS S3 compatible data infrastructure on any cloud. The result…

min.io

MinIO offers high-performance, S3 compatible object storage.
Native to Kubernetes, MinIO is the only object storage suite available on
every public cloud, every Kubernetes distribution, the private cloud and the
edge. MinIO is software-defined and is 100% open source under GNU AGPL v3.

$ docker run -p 9000:9000 -p 9001:9001 --rm --name minio-server \  -v /[path-to-local-folder]:/data minio/minio server \  /data --console-address ':9001'Formatting 1st pool, 1 set(s), 1 drives per set.Automatically configured API requests per node based on available memory on the system: 183Finished loading IAM sub-system (took 0.0s of 0.1s to load data).Status:         1 Online, 0 Offline. API: http://172.17.0.3:9000  http://127.0.0.1:9000Console: http://172.17.0.3:9001 http://127.0.0.1:9001Documentation: https://docs.min.io
Console: http://172.17.0.3:35765 http://127.0.0.1:35765Documentation: https://docs.min.ioWARNING: Console endpoint is listening on a dynamic port (35765), please use --console-address ":PORT" to choose a static port.
- name: MINIO_ROOT_USERvalue: minioadmin- name: MINIO_ROOT_PASSWORDvalue: minioadmin

MinIO Client (mc)

MinIO | The complete guide to the MinIO client

MinIO Client (mc) provides a modern alternative to UNIX commands like ls, cat, cp, mirror, diff etc. It supports…

docs.min.io

$ mc --helpNAME:  mc - MinIO Client for cloud storage and filesystems.USAGE:  mc [FLAGS] COMMAND [COMMAND FLAGS | -h] [ARGUMENTS...]COMMANDS:  alias      manage server credentials in configuration file...  update     update mc to latest release  GLOBAL FLAGS:  --autocompletion              install auto-completion for your shell  --config-dir value, -C value  path to configuration folder (default: "/Users/[UserName]/.mc")  --quiet, -q                   disable progress bar display  --no-color                    disable color theme  --json                        enable JSON lines formatted output  --debug                       enable debug output  --insecure                    disable SSL certificate verification  --help, -h                    show help  --version, -v                 print the version  TIP:  Use 'mc --autocompletion' to enable shell autocompletionVERSION:  RELEASE.2022-05-09T04-08-26Z
{        "version": "10",        "aliases": {                "gcs": {                        "url": "https://storage.googleapis.com",                        "accessKey": "YOUR-ACCESS-KEY-HERE",                        "secretKey": "YOUR-SECRET-KEY-HERE",                        "api": "S3v2",                        "path": "dns"                },                "local": {                        "url": "http://localhost:9000",                        "accessKey": "",                        "secretKey": "",                        "api": "S3v4",                        "path": "auto"                },                "play": {                        "url": "https://play.min.io",                        "accessKey": "Q3AM3UQ867SPQQA43P2F",                        "secretKey": "zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG",                        "api": "S3v4",                        "path": "auto"                },                "s3": {                        "url": "https://s3.amazonaws.com",                        "accessKey": "YOUR-ACCESS-KEY-HERE",                        "secretKey": "YOUR-SECRET-KEY-HERE",                        "api": "S3v4",                        "path": "dns"                }        }}%
$ mc ls local[2022-05-12 14:12:46 CST]     0B test1/[2022-05-12 14:18:21 CST]     0B test2/

辦正事了

如果手動在 minio server 內新增檔案,會不會同步到 minio server 內,以及同步到 bueckt 後,檔案是不是可以正常讀取

Deployment and Management

Single-Node Single-Drive (SNSD)

A single MinIO server with a single storage volume or folder. SNSD deployments are best suited for evaluation and initial development of applications using MinIO for object storage. This topology was previously referred to as Standalone Mode.

Starting with RELEASE.2022–06–02T02–11–04Z, SNSD deployments implement a zero-parity erasure coding backend and include support for the following erasure-coding dependent features:

- Versioning

- Object Locking / Retention

This topology is incompatible with the older filesystem-style behavior where MinIO acted as a simple S3 API layer while allowing POSIX-style access to managed files.

請將 image tag 固定成 RELEASE.20220526T05–4841Z.hotfix.204b42b6b

$ docker run -p 9000:9000 -p 9001:9001 --rm --name minio-server \  -v /[path-to-local-folder]:/data minio/minio:RELEASE.2022-05-26T05-48-41Z.hotfix.204b42b6b server /data --console-address ':9001'API: http://172.17.0.3:9000  http://127.0.0.1:9000Console: http://172.17.0.3:9090 http://127.0.0.1:9090Documentation: https://docs.min.ioYou are running an older version of MinIO released 1 month ago  Update: Run `mc admin update`

mc mirror

$ mc alias ls{        "version": "10",        "aliases": {                "clusterA": {                        "url": "https://[API host]",                        "accessKey": "minioadmin",                        "secretKey": "minioadmin",                        "api": "S3v4",                        "path": "auto"                }        }    }
$ mc mirror --overwrite --watch /path-to-folder/for_mc/  clusterA/sync-bucket
# in /path-to-foldermc mirror --overwrite --watch for_mc/ clusterA/sync-bucket

收工

# config.jsontemplate:    spec:      containers:        - name: mc          volumeMounts:            - mountPath: /root/.mc/config.json              readOnly: true              name: mc-config              subPath: config.json      volumes:        - name: mc-config          configMap:            name: minio-configmap# deployment  template:    spec:      containers:        - name: mc          image: mc_image          args: ["mirror", "--overwrite",  "--watch", "/data/",  "clusterA/sync-bucket"]

後記

mc: <ERROR> Invalid URL. URL `https://[ingress-host]/[subpath]/` for MinIO Client should be of the form scheme://host[:port]/ without resource component

MinIO Console

The MinIO Console is a rich graphical user interface that provides similar functionality to the mc command line tool…

docs.min.io

- name: MINIO_BROWSER_REDIRECT_URL  value: https://[ingress-host]/[subpath]/

Pass Console Subpath envrionment variable by dvaldivia · Pull Request #14761 · minio/minio

Right now console supports being served on a subpath via CONSOLE_SUBPATH but the MinIO server is not setting this…

github.com

Minio console cannot be exposed trough k8s ingress and NGINX gateway · Issue #1908 · minio/console

I am using the latest minio release (RELEASE.2022-04-26T01-20-24Z) that introduces MINIO_BROWSER_REDIRECT_URL env…

github.com

Minio console cannot be exposed trough k8s ingress and NGINX gateway · Issue #1908 · minio/console

I am using the latest minio release (RELEASE.2022-04-26T01-20-24Z) that introduces MINIO_BROWSER_REDIRECT_URL env…

github.com

If you go to http://localhost/console/login 👉 everything works fine

If you click on logout after having logged-in 👉 you're redirected to http://localhost/console/console/login

If you go to http://localhost/console (without the login full path) 👉 you're redirected to http://localhost/console/console/login

還是要個 Domain 比較實際 …

点击阅读全文
Logo

K8S/Kubernetes社区为您提供最前沿的新闻资讯和知识内容

更多推荐