J release changes
[ric-plt/ric-dep.git] / helm / infrastructure / subcharts / kong / example-values / hybrid-cert-manager / README.md
1 This README explains how to install Kong in DB-backed mode with Postgres and Cert Manager
2
3 # Install Postgres
4
5 Use the bitnami chart to install Postgres. Read the output to understand how to connect to the database.
6
7 ```bash
8 helm install postgres oci://registry-1.docker.io/bitnamicharts/postgresql -n db --create-namespace
9 ```
10
11 Once connected, create a postgres user and database:
12
13 ```sql
14 CREATE USER kong WITH PASSWORD 'super_secret'; CREATE DATABASE kong OWNER kong;
15 ```
16
17 # Cert Manager
18
19 Install Cert Manager in to your cluster:
20
21 ```bash
22 kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.11.0/cert-manager.crds.yaml
23 helm install \
24   cert-manager jetstack/cert-manager \
25   --namespace cert-manager \
26   --create-namespace \
27   --version v1.11.0
28 ```
29
30 Create a self signed CA + Issuer for future use:
31
32 ```yaml
33 echo "
34 apiVersion: v1
35 kind: Namespace
36 metadata:
37   name: kong
38 ---
39 apiVersion: cert-manager.io/v1
40 kind: ClusterIssuer
41 metadata:
42   name: selfsigned-issuer
43 spec:
44   selfSigned: {}
45 ---
46 apiVersion: cert-manager.io/v1
47 kind: Certificate
48 metadata:
49   name: my-selfsigned-ca
50   namespace: kong
51 spec:
52   isCA: true
53   commonName: my-selfsigned-ca
54   secretName: root-secret
55   privateKey:
56     algorithm: ECDSA
57     size: 256
58   issuerRef:
59     name: selfsigned-issuer
60     kind: ClusterIssuer
61     group: cert-manager.io
62 ---
63 apiVersion: cert-manager.io/v1
64 kind: Issuer
65 metadata:
66   name: my-ca-issuer
67   namespace: kong
68 spec:
69   ca:
70     secretName: root-secret
71 " | kubectl apply -f -
72 ```
73
74 # Kong
75
76 Deploy Kong using the `cp-values.yaml` and `dp-values.yaml` in this folder:
77
78 ```bash
79 helm install kong-cp kong/kong -n kong --values cp-values.yaml
80 helm install kong-dp kong/kong -n kong --values dp-values.yaml
81 ```
82
83 You should now have Kong running in hybrid mode