Skip to content

Commit 664edba

Browse files
committed
apply the same style to the cert-manager example
On-behalf-of: @SAP christoph.mewes@sap.com
1 parent ad3afd7 commit 664edba

1 file changed

Lines changed: 45 additions & 9 deletions

File tree

docs/content/usage/integrations/cert-manager.md

Lines changed: 45 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,25 @@ weight: 10
77

88
# Cert-Manager Integration
99

10-
1. **Install cert-manager** in your Kubernetes cluster, where kube-bind backend is running, if you haven't already. You can follow the official installation guide [here](https://cert-manager.io/docs/installation/kubernetes/).
10+
## Setup
1111

12-
2. **Add kube-bind export label** to certificate CRD.
12+
The following sections will guide you through the one-time setup that is required for providing
13+
certificates using cert-manager and kube-bind.
14+
15+
### Install cert-manager
16+
17+
Install cert-manager in your Kubernetes cluster, where kube-bind backend is running, if you haven't
18+
already. You can follow the [official installation guide](https://cert-manager.io/docs/installation/kubernetes/).
19+
20+
### Export the Certificate CRD
21+
22+
To export the cert-manager `Certificate` CRD, add the kube-bind export label to it:
1323

1424
```bash
1525
kubectl label crd certificates.cert-manager.io kube-bind.io/exported=true --overwrite
1626
```
1727

18-
3. **Create SelfSigned issuer** in the provider cluster.
28+
### Create a SelfSigned Issuer
1929

2030
```yaml
2131
kubectl apply -f - <<EOF
@@ -28,7 +38,10 @@ spec:
2838
EOF
2939
```
3040

31-
4. **Create a `kube-bind` template for `Certificate` resources** to allow service consumers to request TLS certificates. Below is an example template:
41+
### Create a APIServiceExportTemplate
42+
43+
It's now time to configure kube-bind to export the certificate resource. To do so, create a
44+
kube-bind `APIServiceExportTemplate` for `Certificate` resources like this one:
3245

3346
```yaml
3447
kubectl apply -f - <<EOF
@@ -57,15 +70,31 @@ spec:
5770
EOF
5871
```
5972

60-
5. **Login into the kube-bind CLI** and request a binding to the `certificate` template created above. This will allow you to create `Certificate` resources in your consumer cluster.
73+
## Usage
74+
75+
Now that everything is set up, users can begin to bind to your backend and begin consuming the new
76+
API.
77+
78+
### Login to kube-bind
6179

6280
```bash
6381
kubectl bind login https://kube-bind.example.com
82+
```
83+
84+
### Request a Binding
85+
86+
Request a binding to the `certificate` template created above. This will allow you to create
87+
`Certificate` objects in your consumer cluster.
88+
89+
```bash
6490
# you will get redirected to UI to authenticate and pick the template
6591
kubectl bind
6692
```
6793

68-
6. **Wait for the binding to be established.** Once the binding is active, you can create `Certificate` resources in your consumer cluster, and you will get `Certificate` objects synced from the provider cluster.
94+
### Wait for the Binding to be Established
95+
96+
Once the binding is active, you can create `Certificate` objects in your consumer cluster, and you
97+
will get `Certificate` objects synced from the provider cluster.
6998

7099
```bash
71100
kubectl bind
@@ -87,10 +116,13 @@ Created 1 APIServiceBinding(s):
87116
Resources bound successfully!
88117
```
89118

90-
7. **Create a `Certificate` resource** in your consumer cluster. The cert-manager in the provider cluster will handle the issuance and management of the TLS certificate.
119+
### Create a Certificate
120+
121+
Now you can finally create a `Certificate` object in your consumer cluster. The cert-manager in the
122+
provider cluster will handle the issuance and management of the TLS certificate.
91123

92124
!!! note
93-
my-selfsigned-issuer must be present in the provider cluster for this example to work.
125+
`my-selfsigned-issuer` must be present in the provider cluster for this example to work.
94126

95127
```yaml
96128
kubectl apply -f - <<EOF
@@ -109,12 +141,16 @@ spec:
109141
EOF
110142
```
111143

112-
8. Observe that the `Certificate` resource is created in the consumer cluster and the corresponding TLS secret is generated.
144+
### Wait for Provisioning
145+
146+
Observe that the `Certificate` object is created in the consumer cluster and the corresponding TLS
147+
Secret is generated:
113148

114149
```bash
115150
kubectl get certificates
116151
NAME READY SECRET AGE
117152
my-tls-cert True my-tls-cert 6m55s
153+
118154
kubectl get secrets
119155
NAME TYPE DATA AGE
120156
my-tls-cert kubernetes.io/tls 3 6m33s

0 commit comments

Comments
 (0)