### MinIO Server Output Example Source: https://github.com/minio/docs/blob/main/source/operations/deployments/baremetal-deploy-minio-on-macos.rst Example output displayed when the MinIO server starts successfully. It includes copyright information, license details, and confirms the server is running. ```shell MinIO Object Storage Server Copyright: 2015-2024 MinIO, Inc. License: GNU AGPLv3 - https://www.gnu.org/licenses/agpl-3.0.html ``` -------------------------------- ### Start MinIO Server (Shell) Source: https://github.com/minio/docs/blob/main/source/index.rst Instructions for starting the MinIO server process on baremetal installations. Specifies the data directory and the console listen address. Supports both Linux/macOS and Windows. ```shell minio server ~/minio --console-address :9001 # For windows, use minio.exe server ~/minio --console-address :9001 ``` -------------------------------- ### MinIO Server Startup with TLS Configuration Source: https://github.com/minio/docs/blob/main/source/reference/minio-server/minio-server.rst Example of starting the MinIO server with custom TLS/SSL certificates directory. ```APIDOC ## POST /minio/server ### Description Starts the MinIO server with specified configurations, including custom certificate paths for TLS/SSL. ### Method POST ### Endpoint /minio/server ### Parameters #### Query Parameters - **--certs-dir, -S** (string) - Optional - Specifies the path to the folder containing certificates for configuring TLS/SSL connectivity. The folder must follow a specific structure including private.key, public.crt, and potentially subdirectories like CAs/. - **--quiet** (boolean) - Optional - Disables startup information. - **--anonymous** (boolean) - Optional - Hides sensitive information from logging. - **--json** (boolean) - Optional - Outputs server logs and startup information in JSON format. ### Request Example ```shell minio server http://server{1...4}/disk{1...4} --sftp="address=:8022" --sftp="ssh-private-key=/home/miniouser/.ssh/id_rsa" --sftp="kex-algos=diffie-hellman-group14-sha256,curve25519-sha256@libssh.org" --certs-dir /etc/minio ``` ### Response #### Success Response (200) Indicates the MinIO server has started successfully. Specific output may vary based on flags used (e.g., JSON format if --json is enabled). #### Response Example ``` MinIO Server running on http://127.0.0.1:9000 API running on http://127.0.0.1:9001 ` ``` -------------------------------- ### MinIO Server Startup with SFTP and TLS Configuration Source: https://github.com/minio/docs/blob/main/source/reference/minio-server/minio-server.rst Example of starting a MinIO server instance with multiple nodes, SFTP configuration, and specifying a custom directory for TLS/SSL certificates. This command demonstrates how to set up a distributed MinIO deployment with secure connectivity. ```shell minio server http://server{1...4}/disk{1...4} \ --sftp="address=:8022" --sftp="ssh-private-key=/home/miniouser/.ssh/id_rsa" \ --sftp="kex-algos=diffie-hellman-group14-sha256,curve25519-sha256@libssh.org" \ --certs-dir /etc/minio ``` -------------------------------- ### Install mc from Source (Golang) Source: https://github.com/minio/docs/blob/main/source/includes/minio-mc-installation.rst Installs the MinIO Client (mc) from source code, intended for developers. Requires a working Golang environment. This method uses the `go install` command to build and install the utility. ```shell go install github.com/minio/mc@latest ``` -------------------------------- ### Start MinIO Server with Configuration Source: https://github.com/minio/docs/blob/main/source/includes/windows/common-minio-kes.rst Starts the MinIO server process using a specific configuration environment file. ```powershell export MINIO_CONFIG_ENV_FILE=|minioconfigpath|\config\minio C:\minio.exe server --console-address :9001 ``` -------------------------------- ### Start MinIO Service and Check Status Source: https://github.com/minio/docs/blob/main/source/includes/linux/steps-deploy-minio-single-node-multi-drive.rst Command to start the MinIO service using systemd and an example of the expected journalctl output to verify the service is running and accessible. ```shell sudo systemctl start minio journalctl -u minio.service ``` ```shell Status: 1 Online, 0 Offline. API: http://192.168.2.100:9000 http://127.0.0.1:9000 RootUser: myminioadmin RootPass: minio-secret-key-change-me Console: http://192.168.2.100:9001 http://127.0.0.1:9001 RootUser: myminioadmin RootPass: minio-secret-key-change-me ``` -------------------------------- ### Basic Bucket Watch Example Source: https://github.com/minio/docs/blob/main/source/reference/minio-mc/mc-watch.rst A simple example showing the minimal syntax required to watch a specific MinIO bucket using its alias. ```shell mc watch myminio/mybucket ``` -------------------------------- ### MinIO Service Startup and Status Output Source: https://github.com/minio/docs/blob/main/source/includes/linux/steps-deploy-minio-single-node-single-drive.rst This snippet shows the expected output after starting a MinIO service. It includes details about the service status, API and Console endpoints, root user credentials, and command-line examples for setting up aliases using the 'mc' tool. This output is crucial for verifying a successful MinIO deployment. ```shell Status: 1 Online, 0 Offline. API: http://192.168.2.100:9000 http://127.0.0.1:9000 RootUser: myminioadmin RootPass: minio-secret-key-change-me Console: http://192.168.2.100:9001 http://127.0.0.1:9001 RootUser: myminioadmin RootPass: minio-secret-key-change-me Command-line: https://docs.min.io/community/minio-object-store/reference/minio-mc.html $ mc alias set myminio http://10.0.2.100:9000 myminioadmin minio-secret-key-change-me Documentation: https://docs.min.io/community/minio-object-store/index.html ``` -------------------------------- ### Install MinIO Server (Windows) Source: https://github.com/minio/docs/blob/main/source/includes/minio-server-installation.rst Provides instructions for installing the MinIO server on Windows by downloading the executable. Users can run it via double-click or command prompt/PowerShell. ```powershell \path\to\mc.exe --help ``` -------------------------------- ### Start MinIO Server with KES Configuration Source: https://github.com/minio/docs/blob/main/source/includes/common/common-minio-kes.rst Sets the environment configuration file and starts the MinIO server process in the foreground. ```shell export MINIO_CONFIG_ENV_FILE=|minioconfigpath|/minio minio server --console-address :9001 ``` -------------------------------- ### Install MinIO Server on Linux Source: https://github.com/minio/docs/blob/main/source/includes/linux/deploy-standalone.rst Methods for installing MinIO on 64-bit Linux systems. Includes commands for RPM, DEB, and binary installation paths. ```shell wget |minio-rpm| -O minio.rpm sudo dnf install minio.rpm ``` ```shell wget |minio-deb| -O minio.deb sudo dpkg -i minio.deb ``` ```shell wget https://dl.min.io/server/minio/release/linux-amd64/minio chmod +x minio sudo mv minio /usr/local/bin/ ``` -------------------------------- ### Install mc on Windows Source: https://github.com/minio/docs/blob/main/source/includes/minio-mc-installation.rst Provides instructions for installing the MinIO Client (mc) on Windows. Users can download the executable directly or run it from the command prompt/PowerShell after downloading. ```powershell mc.exe --help ``` -------------------------------- ### Install MinIO Server from Source (Golang) Source: https://github.com/minio/docs/blob/main/source/includes/minio-server-installation.rst Installs the MinIO server from source code using Go. This method requires a working Golang environment and is intended for developers. Note that 'mc admin update' is not supported with source installations. ```shell go install github.com/minio/minio@latest ``` -------------------------------- ### Start MinIO Server Source: https://github.com/minio/docs/blob/main/source/includes/linux/deploy-standalone.rst Commands to create a data directory and start the MinIO server process with a specified console address. ```shell mkdir ~/minio-data minio server ~/minio-data --console-address ":9001" ``` -------------------------------- ### Example MySQL Notification Configuration Output Source: https://github.com/minio/docs/blob/main/source/administration/monitoring/publish-events-to-mysql.rst Example output from the MinIO server process on startup, indicating configured MySQL targets for notifications. ```shell notify_mysql:primary format="namespace" table="minio_images" dsn_string="user:pass@tcp(mysql.example.com:3306)/miniodb" notify_mysql:secondary format="namespace" table="minio_images" dsn_string="user:pass@tcp(mysql.example.com:3306)/miniodb" ``` -------------------------------- ### Start MinIO Server (Shell) Source: https://github.com/minio/docs/blob/main/source/reference/minio-server/minio-server.rst Starts the MinIO server process, specifying the storage directories. This command is fundamental for launching a MinIO instance. For distributed deployments, multiple hostnames and directories can be specified. ```shell minio server /mnt/disk{1...4} ``` -------------------------------- ### Start MinIO with Object Lambda Configuration Source: https://github.com/minio/docs/blob/main/source/developers/transforms-with-object-lambda.rst Starts the MinIO server with environment variables configured to enable and register the Object Lambda webhook endpoint. ```shell MINIO_LAMBDA_WEBHOOK_ENABLE_myfunction=on MINIO_LAMBDA_WEBHOOK_ENDPOINT_myfunction=http://localhost:5000 minio server /data ``` -------------------------------- ### Download and Install MinIO Binary for MacOS Source: https://github.com/minio/docs/blob/main/source/operations/deployments/baremetal-deploy-minio-on-macos.rst Commands to download, set permissions, and install the MinIO server binary to the system path for both ARM64 and AMD64 architectures. ```shell # For ARM64 (Apple Silicon): curl -O https://dl.min.io/server/minio/release/darwin-arm64/minio chmod +x ./minio sudo mv ./minio /usr/local/bin/ # For AMD64 (Intel): curl -O https://dl.min.io/server/minio/release/darwin-amd64/minio chmod +x ./minio sudo mv ./minio /usr/local/bin/ ``` -------------------------------- ### Start Prometheus Server (Shell) Source: https://github.com/minio/docs/blob/main/source/operations/monitoring/collect-minio-metrics-using-prometheus.rst Command to start the Prometheus server using a specified configuration file. This ensures Prometheus loads the defined scrape configurations for MinIO. ```shell prometheus --config.file=prometheus.yaml ``` -------------------------------- ### Copy Object from Local Filesystem to MinIO using mc cp Source: https://github.com/minio/docs/blob/main/source/reference/minio-mc/mc-cp.rst Example of copying a specific object from a local filesystem to a MinIO bucket. This shows the reverse operation of the previous example. ```none mc cp ~/mydata/object.txt play/mybucket/object.txt ``` -------------------------------- ### Install MinIO Client on macOS (amd64 Binary) Source: https://github.com/minio/docs/blob/main/source/includes/container/quickstart.rst Downloads and installs the MinIO Client binary for macOS on Intel-based chips. It makes the binary executable and places it in the system's PATH. ```shell curl -O https://dl.min.io/client/mc/release/darwin-amd64/mc chmod +x mc sudo mv mc /usr/local/bin/mc ``` -------------------------------- ### MinIO Server Startup Summary Example (Shell) Source: https://github.com/minio/docs/blob/main/source/operations/deployments/baremetal-deploy-minio-on-redhat-linux.rst An example output demonstrating the summary information emitted by the MinIO process upon successful startup. It includes details about the object storage server, copyright, license, version, API endpoints, root user, and root password. ```shell MinIO Object Storage Server Copyright: 2015-2024 MinIO, Inc. License: GNU AGPLv3 - https://www.gnu.org/licenses/agpl-3.0.html Version: RELEASE.2024-06-07T16-42-07Z (go1.22.4 linux/amd64) API: https://minio-1.example.net:9000 https://203.0.113.10:9000 https://127.0.0.1:9000 RootUser: minioadmin RootPass: minioadmin ``` -------------------------------- ### Go SDK: Initialize Client and Perform Basic Operations Source: https://context7.com/minio/docs/llms.txt Demonstrates how to initialize the MinIO Go SDK client, create a bucket, upload a file, download a file, list objects in a bucket, and remove an object. Requires the 'github.com/minio/minio-go/v7' package. ```go package main import ( "context" "fmt" "log" "os" "github.com/minio/minio-go/v7" "github.com/minio/minio-go/v7/pkg/credentials" ) func main() { ctx := context.Background() // Initialize MinIO client client, err := minio.New("play.min.io", &minio.Options{ Creds: credentials.NewStaticV4("Q3AM3UQ867SPQQA43P2F", "zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG", ""), Secure: true, }) if err != nil { log.Fatalln(err) } // Create a bucket bucketName := "my-go-bucket" location := "us-east-1" err = client.MakeBucket(ctx, bucketName, minio.MakeBucketOptions{Region: location}) if err != nil { exists, errBucketExists := client.BucketExists(ctx, bucketName) if errBucketExists == nil && exists { log.Printf("Bucket %s already exists\n", bucketName) } else { log.Fatalln(err) } } else { log.Printf("Successfully created %s\n", bucketName) } // Upload a file objectName := "my-object" filePath := "/tmp/testfile.txt" contentType := "application/octet-stream" info, err := client.FPutObject(ctx, bucketName, objectName, filePath, minio.PutObjectOptions{ ContentType: contentType, }) if err != nil { log.Fatalln(err) } fmt.Printf("Successfully uploaded %s of size %d\n", objectName, info.Size) // Download a file err = client.FGetObject(ctx, bucketName, objectName, "/tmp/downloaded.txt", minio.GetObjectOptions{}) if err != nil { log.Fatalln(err) } fmt.Println("Successfully downloaded object") // List objects objectCh := client.ListObjects(ctx, bucketName, minio.ListObjectsOptions{ Prefix: "", Recursive: true, }) for object := range objectCh { if object.Err != nil { log.Fatalln(object.Err) } fmt.Printf("Object: %s, Size: %d bytes\n", object.Key, object.Size) } // Remove an object err = client.RemoveObject(ctx, bucketName, objectName, minio.RemoveObjectOptions{}) if err != nil { log.Fatalln(err) } fmt.Println("Successfully removed object") } ``` -------------------------------- ### Replicate Job YAML Configuration Example Source: https://github.com/minio/docs/blob/main/source/reference/minio-mc/mc-batch-generate.rst An example YAML configuration for a MinIO replicate batch job. This serves as a starting point for defining replication tasks between MinIO deployments. ```yaml --- # MinIO Batch Replicate Job # # For more information about the replicate job ``` -------------------------------- ### Remove Event with Specific Event Types Source: https://github.com/minio/docs/blob/main/source/reference/minio-mc/mc-event-remove.rst Example of removing an event notification while specifying the exact event types (get, put) that match the existing configuration. ```shell mc event rm alias/bucket arn:minio:sqs::mytest:webhook --event get,put ``` -------------------------------- ### Deploy MinIO Multi-Drive Container Source: https://github.com/minio/docs/blob/main/source/operations/deployments/baremetal-deploy-minio-as-a-container.rst Starts a MinIO container with multiple persistent storage volumes for increased capacity and performance. This example demonstrates mounting four distinct drives to the container. ```shell mkdir -p ~/minio/data-{1..4} podman run \ -p 9000:9000 \ -p 9001:9001 \ --name minio \ -v /mnt/drive-1:/mnt/drive-1 \ -v /mnt/drive-2:/mnt/drive-2 \ -v /mnt/drive-3:/mnt/drive-3 \ -v /mnt/drive-4:/mnt/drive-4 \ -e "MINIO_ROOT_USER=ROOTNAME" \ -e "MINIO_ROOT_PASSWORD=CHANGEME123" \ quay.io/minio/minio server http://localhost:9000/mnt/drive-{1...4} --console-address ":9001" ``` -------------------------------- ### Start MinIO Server Pool (Shell) Source: https://github.com/minio/docs/blob/main/source/operations/concepts.rst This command initiates a single MinIO Server Pool with 4 server nodes, each configured with 4 drives. This setup is suitable for creating a distributed MinIO environment. ```shell minio server https://minio{1...4}.example.net/mnt/disk{1...4} ``` -------------------------------- ### Configure MinIO Environment Variables (Shell) Source: https://github.com/minio/docs/blob/main/source/operations/deployments/baremetal-deploy-minio-on-ubuntu-linux.rst Defines environment variables for the MinIO service, primarily used for setting up distributed deployments. This example configures the MINIO_VOLUMES variable for a multi-node, multi-drive setup, specifying hostnames, ports, and drive paths. ```shell # Set the hosts and volumes MinIO uses at startup # The command uses MinIO expansion notation {x...y} to denote a # sequential series. # # The following example covers four MinIO hosts # with 4 drives each at the specified hostname and drive locations. # # The command includes the port that each MinIO server listens on # (default 9000). # If you run without TLS, change https -> http MINIO_VOLUMES="https://minio{1...4}.example.net:9000/mnt/disk{1...4}/minio" # Set all MinIO server command-line options # ``` -------------------------------- ### Install and Configure MinIO Client (mc) Source: https://github.com/minio/docs/blob/main/source/includes/linux/quickstart.rst Downloads the MinIO client binary, sets executable permissions, moves it to the system path, and configures a local alias for management. ```shell wget https://dl.min.io/client/mc/release/linux-amd64/mc chmod +x mc sudo mv mc /usr/local/bin/mc mc alias set local http://127.0.0.1:9000 minioadmin minioadmin mc admin info local ``` -------------------------------- ### Specify Event Trigger for Bucket Operations (Shell) Source: https://github.com/minio/docs/blob/main/source/reference/minio-mc/mc-event-add.rst This example demonstrates how to add an event notification trigger for specific S3 operations ('PUT', 'GET', 'DELETE') on a bucket. It requires the MinIO alias and bucket name, along with the ARN of a pre-configured bucket notification target. ```shell mc event add play/mybucket ``` -------------------------------- ### Connect to MinIO using Python SDK Source: https://github.com/minio/docs/blob/main/source/includes/common/common-configure-keycloak-identity-management.rst Demonstrates how to initialize the MinIO client using the temporary credentials generated from the AssumeRoleWithWebIdentity workflow. ```python from minio import Minio client = MinIO( "|MINIO_S3_URL|", access_key = "ACCESS_KEY", secret_key = "SECRET_KEY", session_token = "SESSION_TOKEN", secure = True ) client.list_buckets() ``` -------------------------------- ### Start MinIO Server with Environment File Source: https://github.com/minio/docs/blob/main/source/operations/deployments/baremetal-deploy-minio-on-macos.rst Command to start the MinIO server using a specified environment configuration file. It sets the environment variable for the configuration file and then launches the MinIO server, making it listen on the specified console address. ```shell export MINIO_CONFIG_ENV_FILE=/etc/default/minio minio server --console-address :9001 ``` -------------------------------- ### Install MinIO Server using Homebrew (macOS) Source: https://github.com/minio/docs/blob/main/source/includes/minio-server-installation.rst Installs the MinIO server using the Homebrew package manager on macOS. After installation, the 'minio' command can be executed directly. ```shell brew install minio/stable/minio minio --help ``` -------------------------------- ### Setup Test Environment with MinIO Client Source: https://github.com/minio/docs/blob/main/source/developers/transforms-with-object-lambda.rst Configures the MinIO client alias, creates a bucket, and uploads a test file to be used for Lambda transformation testing. ```shell mc alias set myminio/ http://localhost:9000 minioadmin minioadmin mc mb myminio/myfunctionbucket cat > testobject << EOF Hello, World! EOF mc cp testobject myminio/myfunctionbucket/ ``` -------------------------------- ### Download MinIO Server Binary Source: https://github.com/minio/docs/blob/main/source/includes/linux/steps-deploy-minio-single-node-multi-drive.rst Instructions for downloading the MinIO server binary. This is the first step in setting up a MinIO deployment. ```shell wget https://dl.min.io/server/minio/release/linux-amd64/minio chmod +x minio ``` -------------------------------- ### Install MinIO via Package Manager or Binary Source: https://github.com/minio/docs/blob/main/source/includes/linux/common-installation.rst Commands to download and install MinIO on Linux systems. Includes methods for RPM-based, DEB-based distributions, and direct binary installation. ```shell # RPM Installation wget |minio-rpm| -O minio.rpm sudo dnf install minio.rpm # DEB Installation wget |minio-deb| -O minio.deb sudo dpkg -i minio.deb # Binary Installation wget https://dl.min.io/server/minio/release/linux-amd64/minio chmod +x minio sudo mv minio /usr/local/bin/ ``` -------------------------------- ### Install MinIO Client on macOS using Homebrew Source: https://github.com/minio/docs/blob/main/source/includes/container/quickstart.rst Installs the MinIO Client package for macOS using the Homebrew package manager. This is a convenient method for users who have Homebrew installed. ```shell brew install minio/stable/mc ``` -------------------------------- ### Install MinIO Operator Helm Chart Source: https://github.com/minio/docs/blob/main/source/operations/deployments/k8s-deploy-operator-helm-on-kubernetes.rst Installs the MinIO Operator using the Helm package manager. It specifies the namespace for the installation and creates it if it doesn't exist. Assumes the chart is available locally. ```shell helm install \ --namespace minio-operator \ --create-namespace \ minio-operator ./operator ``` -------------------------------- ### Start MinIO Server Instances Source: https://context7.com/minio/docs/llms.txt Commands to initialize MinIO server processes. Supports single-node multi-drive, distributed clusters, and optional security configurations like TLS and FTP/SFTP. ```bash # Start MinIO server with 4 drives (Single-Node Multi-Drive) minio server /mnt/disk{1...4} # Start with custom API and console ports minio server /mnt/disk{1...4} --address :9000 --console-address :9001 # Start distributed MinIO cluster (Multi-Node Multi-Drive) minio server http://minio{1...4}.example.net/mnt/disk{1...4} # Start with FTP/SFTP support enabled minio server http://server{1...4}/disk{1...4} \ --ftp="address=:8021" \ --ftp="passive-port-range=30000-40000" \ --sftp="address=:8022" \ --sftp="ssh-private-key=/home/miniouser/.ssh/id_rsa" # Start with TLS certificates minio server /mnt/disk{1...4} --certs-dir /etc/minio/certs ``` -------------------------------- ### Install mc on macOS using Homebrew Source: https://github.com/minio/docs/blob/main/source/includes/minio-mc-installation.rst Installs the MinIO Client (mc) on macOS using the Homebrew package manager. This is a convenient method for macOS users to install and manage the mc utility. ```shell brew install minio/stable/mc mc --help ``` -------------------------------- ### Install mc on Linux (64-bit PPC) Source: https://github.com/minio/docs/blob/main/source/includes/minio-mc-installation.rst Downloads and installs the mc client for Linux 64-bit PowerPC systems. It fetches the binary, makes it executable, and adds it to the system's PATH temporarily. This method ensures you are using the official MinIO binary. ```shell curl https://dl.min.io/client/mc/release/linux-ppc64le/mc \ --create-dirs \ -o ~/minio-binaries/mc chmod +x $HOME/minio-binaries/mc export PATH=$PATH:$HOME/minio-binaries/ mc --help ``` -------------------------------- ### Example: Audit Metrics Endpoint Source: https://github.com/minio/docs/blob/main/source/operations/monitoring/metrics-and-alerts.rst This example shows how to access the audit metrics specifically. ```APIDOC ## GET /minio/metrics/v3/audit ### Description Retrieves audit-related metrics from the MinIO server. ### Method GET ### Endpoint /minio/metrics/v3/audit ### Parameters None ### Request Example None ### Response #### Success Response (200) - **metrics** (string) - A text-based response containing audit metrics in Prometheus format. #### Response Example ``` # HELP minio_audit_log_entries_total Total number of audit log entries. # TYPE minio_audit_log_entries_total counter minio_audit_log_entries_total{event="PutObject",user="minioadmin"} 678 ``` ``` -------------------------------- ### Install mc on Linux (64-bit Intel) Source: https://github.com/minio/docs/blob/main/source/includes/minio-mc-installation.rst Downloads and installs the mc client for Linux 64-bit Intel systems. It fetches the binary, makes it executable, and adds it to the system's PATH temporarily. This method ensures you are using the official MinIO binary. ```shell curl https://dl.min.io/client/mc/release/linux-amd64/mc \ --create-dirs \ -o $HOME/minio-binaries/mc chmod +x $HOME/minio-binaries/mc export PATH=$PATH:$HOME/minio-binaries/ mc --help ``` -------------------------------- ### Install MinIO via Homebrew Source: https://github.com/minio/docs/blob/main/source/operations/deployments/baremetal-deploy-minio-on-macos.rst Commands to install the latest stable MinIO server package using the Homebrew package manager on MacOS. It includes steps for fresh installations and migrating from older package versions. ```shell brew install minio/stable/minio # If migrating from previous installation: brew uninstall minio brew install minio/stable/minio ``` -------------------------------- ### mc cat Examples Source: https://github.com/minio/docs/blob/main/source/reference/minio-mc/mc-cat.rst Illustrative examples of using the mc cat command for various scenarios. ```APIDOC ## mc cat Examples ### View an S3 Object Use `mc cat` to return the object: ```shell mc cat ALIAS/PATH ``` - Replace `ALIAS` with the alias of the S3-compatible host. - Replace `PATH` with the path to the object on the S3-compatible host. ### View an S3 Object at a Point-In-Time Use `mc cat --rewind` to return the object at a specific point-in-time in the past: ```shell mc cat ALIAS/PATH --rewind DURATION ``` - Replace `ALIAS` with the alias of the S3-compatible host. - Replace `PATH` with the path to the object on the S3-compatible host. - Replace `DURATION` with the point-in-time in the past (e.g., `30d`). ``` -------------------------------- ### Install cert-manager via kubectl Source: https://github.com/minio/docs/blob/main/source/operations/network-encryption/cert-manager.rst Installs the cert-manager controller into the Kubernetes cluster using the official manifest file. ```shell kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.12.13/cert-manager.yaml ``` -------------------------------- ### MinIO Server Startup Log for Webhook Target Source: https://github.com/minio/docs/blob/main/source/administration/monitoring/publish-events-to-webhook.rst An example log line printed by the MinIO server process on startup for each configured Webhook target. ```shell SQS ARNs: arn:minio:sqs::primary:webhook ``` -------------------------------- ### Python SDK: Initialize Client and Perform Operations Source: https://context7.com/minio/docs/llms.txt Shows how to initialize the MinIO Python SDK client, create a bucket, upload files from disk and streams, download files, list objects, get object statistics, remove objects, and remove a bucket. Requires the 'minio' package. ```python from minio import Minio from minio.error import S3Error import io def main(): # Initialize client client = Minio( "play.min.io", access_key="Q3AM3UQ867SPQQA43P2F", secret_key="zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG", secure=True ) bucket_name = "my-python-bucket" # Create bucket if it doesn't exist if not client.bucket_exists(bucket_name): client.make_bucket(bucket_name) print(f"Bucket '{bucket_name}' created successfully") else: print(f"Bucket '{bucket_name}' already exists") # Upload a file client.fput_object( bucket_name, "my-object.txt", "/tmp/testfile.txt", content_type="text/plain" ) print("File uploaded successfully") # Upload from bytes/stream data = b"Hello, MinIO!" client.put_object( bucket_name, "hello.txt", io.BytesIO(data), length=len(data), content_type="text/plain" ) print("Stream uploaded successfully") # Download a file client.fget_object(bucket_name, "my-object.txt", "/tmp/downloaded.txt") print("File downloaded successfully") # Get object as stream response = client.get_object(bucket_name, "hello.txt") content = response.read() print(f"Object content: {content.decode()}") response.close() response.release_conn() # List objects objects = client.list_objects(bucket_name, recursive=True) for obj in objects: print(f"Object: {obj.object_name}, Size: {obj.size}, Modified: {obj.last_modified}") # Get object stat stat = client.stat_object(bucket_name, "my-object.txt") print(f"Object size: {stat.size}, ETag: {stat.etag}") # Remove object client.remove_object(bucket_name, "my-object.txt") client.remove_object(bucket_name, "hello.txt") print("Objects removed successfully") # Remove bucket client.remove_bucket(bucket_name) print("Bucket removed successfully") if __name__ == "__main__": try: main() except S3Error as e: print(f"S3 Error: {e}") ``` -------------------------------- ### Verify MinIO Plugin Installation Source: https://github.com/minio/docs/blob/main/source/includes/k8s/install-minio-kubectl-plugin.rst Command to verify that the MinIO kubectl plugin is correctly installed and accessible by checking the version. ```shell kubectl minio version ``` -------------------------------- ### Example kube-controller-manager configuration output Source: https://github.com/minio/docs/blob/main/source/includes/k8s/deploy-operator.rst An example of the expected output from the kube-controller-manager pod configuration, highlighting the required cluster-signing flags. ```yaml spec: containers: - command: - kube-controller-manager - --allocate-node-cidrs=true - --authentication-kubeconfig=/etc/kubernetes/controller-manager.conf - --authorization-kubeconfig=/etc/kubernetes/controller-manager.conf - --bind-address=127.0.0.1 - --client-ca-file=/etc/kubernetes/pki/ca.crt - --cluster-cidr=10.244.0.0/16 - --cluster-name=my-cluster-name - --cluster-signing-cert-file=/etc/kubernetes/pki/ca.crt - --cluster-signing-key-file=/etc/kubernetes/pki/ca.key ``` -------------------------------- ### Install MinIO Client on GNU/Linux Source: https://github.com/minio/docs/blob/main/source/includes/container/quickstart.rst Downloads the MinIO Client binary for Linux, makes it executable, and moves it to the system's PATH. This allows for command-line interaction with MinIO servers. ```shell wget https://dl.min.io/client/mc/release/linux-amd64/mc chmod +x mc sudo mv mc /usr/local/bin/mc ```