We use optional first-party traffic analytics to improve the blog. You can accept or decline — nothing is measured before you choose.

Privacy policy

Skip to content
NyverraNyverra
⌘K
HomeArticlesCorporate site
🇺🇸
Nyverra

Editorial channel

Articles on technology, operations and partners — infrastructure, monitoring and critical environments.

Social media

Explore

  • Home
  • Articles
  • Categories
  • Tags
  • Authors
  • About
  • Contact
  • RSS
  • Corporate site

Nyverra

  • Our services
  • Case studies
  • Partners

Contact

Email[email protected]WhatsApp(62) 99309-1592Client portalITSM · tickets and SLA

Rua RB 18, S/N — Casa 01, Sala 01 · Residencial Buriti · Senador Canedo – GO, Brazil · ZIP 75260-459

Hours: Mon–Fri, 8am–6pm

© 2026 Nyverra. All rights reserved.

CNPJ: 61.571.209/0001-08 · State registration: 20.291.265-5 · D-U-N-S®: 57-323-5796

blog.nyverra.com.br

Terms of usePrivacyCookies
Back to top
  1. Home
  2. Kubernetes
  3. Kubernetes Course 16 — MinIO: Erasure Coding, Buckets, and Credentials
Kubernetes
#Curso Kubernetes#Kubernetes#K8S

Kubernetes Course 16 — MinIO: Erasure Coding, Buckets, and Credentials

Wedson LopesWedson Lopes
31 de outubro de 20264 min de leitura

Applications need to store files: attachments, images, backups, evidence. Block storage (PVC) is not ideal for this; object storage is.

MinIO offers an S3-compatible API within the cluster. It is lightweight, runs on Kubernetes, and scales with erasure coding.

Course seal: tested on Kubernetes 1.35 with MinIO Operator and a 4-server Tenant.

Object Storage in 30 Seconds

  • Bucket: container of objects.
  • Object: file + metadata, accessed by key.
  • S3 API: HTTP with signature (SigV4).
  • Presigned URL: temporary URL for upload/download without credential.

Unlike a PVC, you do not mount it; the application talks HTTP with the bucket. This facilitates multiple pods and external access.

The MinIO Tenant

The operator creates a Tenant with N servers. Each server has its PVC; the set forms a pool with erasure coding.

apiVersion: minio.min.io/v2
kind: Tenant
metadata:
  name: portal-minio
  namespace: portal
spec:
  features:
    bucketDNS: false
  requestAutoCert: false
  configuration:
    name: minio-tenant-config
  pools:
    - name: pool-0
      servers: 4
      volumesPerServer: 1
      volumeClaimTemplate:
        metadata:
          name: data
        spec:
          accessModes: ["ReadWriteOnce"]
          storageClassName: portal-nfs
          resources:
            requests:
              storage: 10Gi

With 4 servers, MinIO uses erasure coding: it tolerates the loss of servers/disks without losing data, as long as there is quorum (half + 1).

Typical services:

  • minio-s3 (S3 API, port 9000).
  • minio (console/API, according to the manifest).
  • portal-minio-hl (headless).

Credentials: Root Is Not for the Application

The operator creates a root secret (minio-tenant-creds) with accesskey/secretkey. Do not use root in the application.

Create users/service accounts with minimal policy:

mc alias set local http://minio-s3:9000 "$ROOT_USER" "$ROOT_PASS"
mc admin user add local portal-backend '<secret-forte>'
mc admin policy attach local readwrite --user portal-backend

Or service account (credential linked to a user):

mc admin user svcacct add local portal-backend

For production, create a policy restricted to the necessary buckets (e.g., portal-storage, whatsapp-backup) instead of global readwrite.

The INF-SEC-01 Case

Our app used minioadmin as access/secret. The new image had a guard that refuses default credentials in production. The deploy failed — and the guard was right.

Lesson: the application should never use the MinIO root credential, and default credentials must be rotated before deployment.

Buckets, Versioning, and Lifecycle

mc mb local/portal-storage
mc version enable local/portal-storage
mc ilm add local/portal-storage --expiry-days 90
  • Versioning: protects against accidental overwrite/deletion.
  • Lifecycle: moves/expires old objects.
  • Object lock/WORM: legal retention (compliance), when necessary.

Each bucket has a policy. Do not make everything public; prefer presigned URLs.

External Access

Options:

  • Ingress with path /minio → MinIO Service.
  • Dedicated subdomain minio.exemplo.com.
  • Internal access only (the application talks to http://minio-s3:9000).

Beware of presigned URL: it uses the configured endpoint. If the internal endpoint is minio-s3, the URL does not work in the browser. Configure the public URL (MINIO_PUBLIC_URL) correctly.

Lab

  1. Check the Tenant:
kubectl -n portal get tenant.minio.min.io
kubectl -n portal get pods -l v1.min.io/tenant=portal-minio
kubectl -n portal get pvc | grep minio
  1. Use mc from inside a MinIO pod:
kubectl -n portal exec portal-minio-pool-0-0 -c minio -- sh
mc --config-dir /tmp/.mc alias set local http://127.0.0.1:9000 "$ROOT_USER" "$ROOT_PASS"
mc --config-dir /tmp/.mc ls local
  1. Create a bucket and an application user with minimal policy.

  2. Upload/download:

echo hello > /tmp/hello.txt
mc --config-dir /tmp/.mc cp /tmp/hello.txt local/portal-storage/
mc --config-dir /tmp/.mc cat local/portal-storage/hello.txt
  1. Generate a presigned URL and test in the browser.

Common Errors

Symptom Cause
Tenant does not become Ready PVC, resource, image, or config
ImagePullBackOff image not on node/registry
App receives 403 wrong policy/user
Presigned URL does not open wrong public endpoint
Console 404 on Ingress wrong path rewrite
Poor performance slow NFS or few disks

Checklist

  • [ ] Tenant with 4 servers and Bound PVCs.
  • [ ] Root creds outside the application.
  • [ ] Service account/minimal policy per app.
  • [ ] Versioning/lifecycle defined.
  • [ ] Public endpoint and presigned URLs tested.
  • [ ] Bucket backup (Velero or mc mirror).
  • [ ] Documented credential rotation.

Glossary

  • Tenant: MinIO Operator resource.
  • erasure coding: redundancy by fragmentation.
  • bucket: container of objects.
  • presigned URL: temporary signed URL.
  • service account: credential linked to a MinIO user.
  • lifecycle: expiration/migration rules.

Next

Now that we have database and object storage, let's go to queues and cache: RabbitMQ and Redis with quorum, sentinel, and PDB.

Next: Kubernetes Course 17 — RabbitMQ and Redis: Quorum, Sentinel, and PDB

Share

Keep reading

Read also

  • Kubernetes Course 17 — RabbitMQ and Redis: Quorum, Sentinel, and PDB
    Kubernetes

    Kubernetes Course 17 — RabbitMQ and Redis: Quorum, Sentinel, and PDB

    Queues and cache in the cluster: RabbitMQ quorum, Redis sentinel, PDB, anti-affinity, and the silent killers of messaging.

    31 de outubro de 20264 min de leitura
  • Kubernetes Course 15 — Postgres with CloudNativePG: HA, Failover, and Backup
    Kubernetes

    Kubernetes Course 15 — Postgres with CloudNativePG: HA, Failover, and Backup

    Database on Kubernetes with an operator: primary, replicas, failover, continuous backup, and tested restore — no guesswork.

    31 de outubro de 20264 min de leitura
  • Kubernetes Course 18 - Elasticsearch/ECK in Practice
    Kubernetes

    Kubernetes Course 18 - Elasticsearch/ECK in Practice

    Shards, replicas, green/yellow/red health, heap, snapshots, and the ECK operator: how to operate the search engine without losing data.

    31 de outubro de 20264 min de leitura

Nyverra

Need specialist help?

  • Infrastructure services
  • Case studies
  • Partners

Comments

No comments yet

Be the first to share your thoughts on this article.

Leave a comment

Newsletter

Get new articles

Subscribe to receive Nyverra blog posts in your inbox. We will send a confirmation link.

​