Search code examples
kubernetesminio

Why do minio tenants need their own namespace?


I am trying out the minio-operator.

This is a two part question regarding namespaces mentioned in the docs.

I would like have a namespace in which I deploy different kinds of operators. Eventhough the docs require a dedicated namespace for the operator, I seem to experience no problems so far, putting all my operators in the same namespace.

The MinIO Operator exists in its own namespace.

When it comes to tenants the docs also require a dedicated namespace for each tenant.

When you use the Operator to create a tenant, the tenant must have its own namespace.

Does this mean nothing else but the tenant can be in this namespace, or just, that no more than one tenant can exist per namespace. What I would like to do is to put a tenant into the same namespace as the solution, that is consuming the minio API.

Is my attempt wrong, and if so, why? What is the reason for those constraints?

I could not find any explanation in the article I cited above.


Solution

  • Currently, it is not possible to have multiple tenants in the same namespace because the MinIO operator always creates services with the names minio, minio-console, and minio-hl in the installation namespace.

    However, a workaround is to use a different namespace for each tenant and use the DNS in Kubernetes to access them: minio.<other-namespace>.svc

    For more information, refer to https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/.