Skip to content

Commit ca34aa7

Browse files
authored
Add cert-manager documentation (#1317)
Adds cert-manager docs for Kubernetes outputs. Closes #1245 Partially addresses #1273
1 parent 3f9a46b commit ca34aa7

12 files changed

+1560
-1
lines changed

source/images/k8s/cert-manager-cluster.svg

Lines changed: 373 additions & 0 deletions
Loading
53.2 KB
Loading

source/images/k8s/cert-manager-graph.svg

Lines changed: 1 addition & 0 deletions
Loading

source/images/k8s/cert-manager-namespaces.svg

Lines changed: 530 additions & 0 deletions
Loading

source/includes/k8s/deploy-operator.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,12 @@ The output of the example command above may differ from the output in your termi
162162
Alternatively, you can generate x.509 TLS certificates signed by a known and trusted CA and pass those certificates to MinIO Tenants.
163163
See :ref:`minio-tls` for more complete documentation.
164164

165+
Certificate Management with cert-manager
166+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
167+
168+
Rather than the MinIO Operator managing certificates, you can configure the deployment to use `cert-manager <https://cert-manager.io/>`__.
169+
For instructions for deploying the MinIO Operator and tenants using cert-manager, refer to the :ref:`cert-manager page <minio-certmanager>`.
170+
165171
Procedure
166172
---------
167173

source/includes/k8s/file-transfer-protocol-k8s.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ If SFTP is enabled, the output resembles the following:
164164
165165
enableSFTP: true
166166
167-
.. _minio-certificate-key-file-sftp-k8s
167+
.. _minio-certificate-key-file-sftp-k8s:
168168

169169
Connect to MinIO Using SFTP with a Certificate Key File
170170
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

source/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ For more about connecting to ``play``, see :ref:`MinIO Console play Login <minio
106106
/operations/external-iam
107107
/operations/server-side-encryption
108108
/operations/network-encryption
109+
/operations/cert-manager
109110
/operations/checklists
110111
/operations/data-recovery
111112
/operations/troubleshooting

source/operations/cert-manager.rst

Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
.. _minio-certmanager:
2+
3+
============
4+
cert-manager
5+
============
6+
7+
.. default-domain:: minio
8+
9+
.. contents:: Table of Contents
10+
:local:
11+
:depth: 1
12+
13+
TLS certificate management with cert-manager
14+
--------------------------------------------
15+
16+
This guide shows you how to install cert-manager for TLS certificate management.
17+
The guide assumes a new or fresh MinIO Operator installation.
18+
19+
.. note::
20+
21+
This guide uses a self-signed ``Cluster Issuer``.
22+
You can also use `other Issuers supported by cert-manager <https://cert-manager.io/docs/configuration/issuers/>`__.
23+
24+
The main difference is that you must provide that ``Issuer`` CA certificate to MinIO, instead of the CA's mentioned in this guide.
25+
26+
Refer to the `cert-manager documentation <https://cert-manager.io>`__ and your own organization's certificate requirements for more advanced configurations.
27+
28+
cert-manager manages certificates within Kubernetes clusters.
29+
The MinIO Operator supports using cert-manager for managing and provisioning certificates as an alternative to the MinIO Operator managing certificates for itself and its tenants.
30+
31+
cert-manager obtains valid certificates from an ``Issuer`` or ``ClusterIssuer`` and can automatically renew certificates prior to expiration.
32+
33+
A ``ClusterIssuer`` issues certificates for multiple namespaces.
34+
An ``Issuer`` only mints certificates for its own namespace.
35+
36+
The following graphic depicts how cert-manager provides certificates in namespaces across a Kubernetes cluster.
37+
38+
- A ``ClusterIssuer`` exists at the root level of the Kubernetes cluster, typically the ``default`` namespace, to provide certificates to all other namespaces.
39+
- The ``minio-operator`` namespace receives its own, local ``Issuer``.
40+
- Each tenant's namespace receives its own, local ``Issuer``.
41+
- The certificates issued by each tenant namespace must be made known to and trusted by the MinIO Operator.
42+
43+
.. image:: /images/k8s/cert-manager-graph.png
44+
:width: 600px
45+
:alt: A graph of the namespaces in a Kubernetes cluster showing the relationship between the root level ClusterIssuer and three other namespaces with their own Issuer.
46+
:align: center
47+
48+
49+
Prerequisites
50+
-------------
51+
52+
- A `supported version of Kubernetes <https://kubernetes.io/releases/>`__.
53+
- `kustomize <https://kustomize.io/>`__ installed
54+
- ``kubectl`` access to your ``k8s`` cluster
55+
56+
.. _minio-setup-certmanager:
57+
58+
Setup cert-manager
59+
------------------
60+
61+
Install cert-manager
62+
~~~~~~~~~~~~~~~~~~~~
63+
64+
The following command installs version 1.12.13 using ``kubectl``.
65+
66+
.. code-block:: shell
67+
:class: copyable
68+
69+
kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.12.13/cert-manager.yaml
70+
71+
`Release 1.12.X LTS <https://cert-manager.io/docs/releases/release-notes/release-notes-1.12/>`__ is preferred, but you may install the latest version.
72+
For more details on installing cert-manager, see their `installation instructions <https://cert-manager.io/docs/installation/>`__.
73+
74+
.. _minio-cert-manager-create-cluster-issuer:
75+
76+
Create a self-signed Cluster Issuer for the cluster
77+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
78+
79+
The ``Cluster Issuer`` is the top level Issuer from which all other certificates in the cluster derive.
80+
81+
1. Request cert-manager to generate this by creating a ``ClusterIssuer`` resource.
82+
83+
Create a file called ``selfsigned-root-clusterissuer.yaml`` with the following contents:
84+
85+
.. code-block:: yaml
86+
:class: copyable
87+
88+
# selfsigned-root-clusterissuer.yaml
89+
apiVersion: cert-manager.io/v1
90+
kind: ClusterIssuer
91+
metadata:
92+
name: selfsigned-root
93+
spec:
94+
selfSigned: {}
95+
96+
2. Apply the resource to the cluster:
97+
98+
.. code-block:: shell
99+
:class: copyable
100+
101+
kubectl apply -f selfsigned-root-clusterissuer.yaml
102+
103+
Next steps
104+
----------
105+
106+
Set up :ref:`cert-manager for the MinIO Operator <minio-certmanager-operator>`.
107+
108+
.. toctree::
109+
:titlesonly:
110+
:hidden:
111+
112+
/operations/cert-manager/cert-manager-operator
113+
/operations/cert-manager/cert-manager-tenants

0 commit comments

Comments
 (0)