You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In certain scenarios, you may already have **cert-manager** installed or need to install it in a different namespace. This guide outlines the steps to configure **APK cert-manager** in such cases.
4
+
5
+
## 1. Ensure Cert-Manager is Installed
6
+
7
+
Before proceeding, ensure that your **cert-manager** is installed and running in its own namespace. You can refer to the <ahref="https://cert-manager.io/docs/installation/"target="_blank">official cert-manager documentation </a> for this.
8
+
9
+
## 2. Create the Namespace for APK
10
+
11
+
We will use this namespace to install APK. For this guide, we will create a namespace named `apk`. Run the following command:
12
+
13
+
```sh
14
+
kubectl create ns apk
15
+
```
16
+
17
+
## 3. Create an Issuer for Cert-Manager in the APK namespace
18
+
19
+
Create an Issuer required for cert-manager by applying the following configuration:
20
+
```
21
+
apiVersion: cert-manager.io/v1
22
+
kind: Issuer
23
+
metadata:
24
+
name: custom-issuer
25
+
namespace: apk
26
+
spec:
27
+
ca:
28
+
secretName: apk-root-certificate
29
+
```
30
+
31
+
You can obtain the <ahref="../../assets/files/cert-manager/issuer.yaml"target="_blank"download>issuer.yaml</a> file here.
32
+
33
+
!!! note
34
+
### Why Use an Issuer Instead of a ClusterIssuer?
35
+
36
+
By default, APK installation comes with a ClusterIssuer, which operates cluster-wide. However, the ClusterIssuer looks for the secret named `apk-root-certificate` in the namespace where the cert-manager is installed, whereas APK creates the secret in its own namespace.
37
+
38
+
There are two ways to fix this.
39
+
40
+
1. Modify the cert-manager installation by forcing the ClusterIssuer to check the APK namespace, as in the <a href="https://cert-manager.io/docs/configuration/#cluster-resource-namespace" target="_blank">official cert-manager documentation</a>.
41
+
42
+
2. To avoid modifying cert-manager’s installation, **create an Issuer instead**, which will look for secrets in its own namespace. Then it can correctly reference the secret containing the root certificate.
43
+
44
+
We will proceed with the **second method** in this guide.
45
+
46
+
## 4. Apply the Issuer
47
+
48
+
Run the following command to apply the issuer in the apk namespace:
it may show a "False" Ready status. This is expected, as the root certificate secret is not created yet. The secret will be generated when APK is installed.
70
+
71
+
## 5. Update `values.yaml`
72
+
73
+
Modify the values.yaml file with the following configuration:
74
+
```
75
+
certmanager:
76
+
enabled: false
77
+
enableClusterIssuer: false
78
+
enableRootCa: true
79
+
rootCaSecretName: "apk-root-certificate"
80
+
issuerKind: "Issuer"
81
+
listeners:
82
+
issuerName: "custom-issuer"
83
+
issuerKind: "Issuer"
84
+
servers:
85
+
issuerName: "custom-issuer"
86
+
issuerKind: "Issuer"
87
+
```
88
+
89
+
This configuration
90
+
91
+
- disables the cert-manager included with APK
92
+
- creates the root certificate for the Issuer
93
+
- refers to an Issuer for the certificate management instead of a ClusterIssuer
94
+
95
+
## 6. Install APK
96
+
97
+
Now, install APK using Helm with the modified values.yaml file.
0 commit comments