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
Copy file name to clipboardExpand all lines: docs/content/usage/integrations/cert-manager.md
+45-9Lines changed: 45 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,15 +7,25 @@ weight: 10
7
7
8
8
# Cert-Manager Integration
9
9
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
11
11
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:
3.**Create SelfSigned issuer** in the provider cluster.
28
+
### Create a SelfSigned Issuer
19
29
20
30
```yaml
21
31
kubectl apply -f - <<EOF
@@ -28,7 +38,10 @@ spec:
28
38
EOF
29
39
```
30
40
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:
32
45
33
46
```yaml
34
47
kubectl apply -f - <<EOF
@@ -57,15 +70,31 @@ spec:
57
70
EOF
58
71
```
59
72
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
61
79
62
80
```bash
63
81
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
64
90
# you will get redirected to UI to authenticate and pick the template
65
91
kubectl bind
66
92
```
67
93
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.
69
98
70
99
```bash
71
100
kubectl bind
@@ -87,10 +116,13 @@ Created 1 APIServiceBinding(s):
87
116
Resources bound successfully!
88
117
```
89
118
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.
91
123
92
124
!!! 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.
94
126
95
127
```yaml
96
128
kubectl apply -f - <<EOF
@@ -109,12 +141,16 @@ spec:
109
141
EOF
110
142
```
111
143
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
Copy file name to clipboardExpand all lines: docs/content/usage/integrations/crossplane.md
+63-30Lines changed: 63 additions & 30 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,16 +7,27 @@ weight: 20
7
7
8
8
# Crossplane Integration
9
9
10
-
This document provides an example deployment walkthrough showing how to integrate kube-bind with Crossplane and how to deploy a sample managed MySQL resource using two kind clusters: a provider cluster (where Crossplane runs and kube-bind backend to export APIs) and a consumer cluster (which allows to bind those APIs using kube-bind konnector).
10
+
This document provides an example deployment walkthrough showing how to integrate kube-bind with
11
+
Crossplane and how to deploy a sample managed MySQL resource using two kind clusters: a provider
12
+
cluster (where Crossplane runs and kube-bind backend to export APIs) and a consumer cluster (which
13
+
allows to bind those APIs using kube-bind konnector).
11
14
12
15
!!! note
13
-
Currently for permission claims to work properly, it is required to run namespaced Crossplane resources.
14
-
16
+
Currently for permission claims to work properly, it is required to run namespaced Crossplane
17
+
resources.
15
18
16
19

17
20
18
-
1.**Install Crossplane** in your Kubernetes cluster where the kube-bind backend will run.
19
-
You can follow the official installation guide [here](https://docs.crossplane.io/v2.1/get-started/install).
21
+
## Setup
22
+
23
+
The following sections will guide you through the one-time setup that is required for providing
24
+
MySQL databases using Crossplane and kube-bind.
25
+
26
+
### Install Crossplane
27
+
28
+
Install Crossplace in your Kubernetes cluster where the kube-bind backend will run. You can follow
29
+
the [official installation guide](https://docs.crossplane.io/v2.1/get-started/install) from the
3.**Set up the mysql deployment in the provider cluster**
60
-
61
-
Create and set up Deployment, PersistentVolume, PersistentVolumeClaim and Service for MySQL instance
71
+
Create and set up `Deployment`, `PersistentVolume`, `PersistentVolumeClaim` and `Service` for the
72
+
MySQL instance.
62
73
63
74
```yaml
64
75
kubectl apply -f - <<EOF
@@ -135,9 +146,9 @@ spec:
135
146
EOF
136
147
```
137
148
138
-
4.**Create a Crossplane XRD and Composition for a managed MySQL database**
149
+
### Configure Crossplane
139
150
140
-
Apply both manifests:
151
+
Time to create a Crossplane XRD and Composition for a managed MySQL database. Apply both manifests:
141
152
142
153
```yaml
143
154
kubectl apply -f - <<EOF
@@ -181,6 +192,7 @@ spec:
181
192
EOF
182
193
```
183
194
195
+
{% raw %}
184
196
```yaml
185
197
kubectl apply -f - <<'EOF'
186
198
apiVersion: apiextensions.crossplane.io/v1
@@ -317,9 +329,11 @@ spec:
317
329
step: create-mysql-resources
318
330
EOF
319
331
```
332
+
{% endraw %}
333
+
334
+
### Export the Database API
320
335
321
-
5.**Export the database API using kube-bind.**
322
-
Create an APIServiceExportTemplate for the mysqldatabase.mangodb.com resource:
336
+
Create an `APIServiceExportTemplate` for the `mysqldatabase.mangodb.com` resource:
323
337
324
338
```yaml
325
339
kubectl apply -f - <<EOF
@@ -344,16 +358,28 @@ spec:
344
358
EOF
345
359
```
346
360
347
-
6.**Login to kube-bind and request a binding to the exported database API.**
361
+
## Usage
348
362
349
-
```bash
350
-
kubectl bind login https://kube-bind.example.com
351
-
# Authenticate and select the mysqldatabase export
352
-
kubectl bind
353
-
```
363
+
Now that everything is set up, users can begin to bind to your backend and begin consuming the new
364
+
API.
354
365
366
+
### Login to kube-bind
355
367
356
-
7. **Wait forthe binding to be established.** Once the binding is active, you can create `MySQLDatabase` resourcesin your consumer cluster, and you will get `MySQLDatabase` objects synced from the provider cluster.
368
+
```bash
369
+
kubectl bind login https://kube-bind.example.com
370
+
```
371
+
372
+
### Request a Binding
373
+
374
+
```bash
375
+
# Authenticate and select the mysqldatabase export
376
+
kubectl bind
377
+
```
378
+
379
+
### Wait for the Binding to be Established
380
+
381
+
Once the binding is active, you can create `MySQLDatabase` resources in your consumer cluster,
382
+
and you will get `MySQLDatabase` objects synced from the provider cluster.
357
383
358
384
```bash
359
385
kubectl bind
@@ -373,14 +399,17 @@ Created 1 APIServiceBinding(s):
373
399
Resources bound successfully!
374
400
```
375
401
376
-
8. **Create a managed database in your consumer cluster.**
377
-
Verify that mysqldatabases.mangodb.com CRD is synced to the consumer cluster:
402
+
### Create a Managed Database
403
+
404
+
Verify that a `mysqldatabases.mangodb.com` CRD is synced to the consumer cluster:
405
+
378
406
```bash
379
407
k get crd mysqldatabases.mangodb.com
380
408
NAME CREATED AT
381
409
mysqldatabases.mangodb.com 2025-11-27T14:22:18Z
382
410
```
383
-
Order a new consumer-database instance in the provider cluster
411
+
412
+
Order a new consumer database instance in the provider cluster:
384
413
385
414
```yaml
386
415
kubectl apply -f - <<EOF
@@ -394,7 +423,10 @@ spec:
394
423
EOF
395
424
```
396
425
397
-
9. **Observe the provisioned database and connection secret in the provider cluster.**
426
+
### Wait for Provisioning
427
+
428
+
The kube-bind konnector and the CloudNativePG operator should now be busy provisioning your
429
+
database. You can observe the provisioned database and connection Secret in the provider cluster:
398
430
399
431
```bash
400
432
kubectl get mysqldatabases.mangodb.com kube-bind-bp52k-consumer-database
kubectl get mysqldatabases.mangodb.com kube-bind-bp52k-consumer-database -o yaml
417
449
```
450
+
418
451
```yaml
419
452
apiVersion: mangodb.com/v1
420
453
kind: MySQLDatabase
@@ -472,18 +505,18 @@ status:
472
505
ready: true
473
506
```
474
507
475
-
You should see your MySQL instance created in the provider cluster and a secret with connection details, once Crossplane finishes provisioning of the database.
508
+
You should see your MySQL instance created in the provider cluster and a secret with connection
509
+
details, once Crossplane finishes provisioning of the database.
476
510
477
-
Observe that the requested secret with connection details for user is synced to consumer cluster.
511
+
Observe that the requested Secret with connection details for user is synced to consumer cluster.
0 commit comments