diff --git a/docs/lets-encrypt.md b/docs/lets-encrypt.md new file mode 100644 index 00000000000..1bb8be28442 --- /dev/null +++ b/docs/lets-encrypt.md @@ -0,0 +1,121 @@ +# MinIO tenant with Let's Encrypt [![Slack](https://slack.min.io/slack?type=svg)](https://slack.min.io) + +This document explains how to deploy a MinIO tenant using certificates generated by [Let's Encrypt](https://letsencrypt.org/). + +## Getting Started + +### Prerequisites + +- Kubernetes version `+v1.19`. While cert-manager supports [earlier K8s versions](https://cert-manager.io/docs/installation/supported-releases/), the MinIO Operator requires 1.19 or later. +- MinIO Operator installed +- `kubectl` access to your `k8s` cluster +- [cert-manager](https://cert-manager.io/docs/installation/) 1.7.X or later installed +```bash +kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.7.2/cert-manager.yaml +``` +- Support for assigning public IPs for `LoadBalancer` type services, if you are deploying `MinIO` on `GKE`, `EKS`, `AKS` +or any other major public cloud provider this functionality is included out of the box, if you are deploying this on a +bare metal `kubernetes` cluster you can use [metallb](https://metallb.universe.tf/), ie: +```bash +kubectl apply -f https://raw.githubusercontent.com/metallb/metallb/v0.12.1/manifests/namespace.yaml +kubectl apply -f https://raw.githubusercontent.com/metallb/metallb/v0.12.1/manifests/metallb.yaml +kubectl apply -f https://kind.sigs.k8s.io/examples/loadbalancer/metallb-configmap.yaml +``` +- [Nginx](https://docs.nginx.com/nginx-ingress-controller/) ingress controller installed +```bash +helm repo add nginx-stable https://helm.nginx.com/stable +helm repo update +helm install nginx-ingress nginx-stable/nginx-ingress \ + --set rbac.create=true \ + --set controller.service.type=LoadBalancer \ + --set controller.service.externalTrafficPolicy=Local \ + --set controller.service.annotations."service\.beta\.kubernetes\.io/aws-load-balancer-proxy-protocol"="*" \ + --set controller.config.use-proxy-protocol="true" +``` +- [kustomize](https://kustomize.io/) installed +- Configure your DNS to route traffic from the MinIO Tenant S3 API hostname (e.g. minio.example.com) and the Tenant Console hostname(e.g. console.example.com) to the IP address of the worker node running ingress. + + +### Deploy tenant + +In this example you are going to request a certificate valid for two domains, `minio.example.com` and `console.example.com`, replace `example.com` +for the actual domain you want to use. + +Create a new `ClusterIssuer` that will request a certificate from `Let's Encrypt`: + +```bash +cat <