Skip to content

Commit 9d3e521

Browse files
committed
fix indentation in docs
On-behalf-of: @SAP christoph.mewes@sap.com
1 parent 13ae130 commit 9d3e521

1 file changed

Lines changed: 17 additions & 13 deletions

File tree

docs/content/setup/local-setup-with-kind.md

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
This guide will walk you through setting up kube-bind between two Kubernetes clusters, where
44

55
* **Backend cluster**:
6-
* Deploys dex, cert-manager and kube-bind/backend
7-
* Provides kube-bind compatible backend for MangoDB resources
6+
* Deploys dex, cert-manager and kube-bind/backend
7+
* Provides kube-bind compatible backend for MangoDB resources
88
* **App cluster**:
9-
* Provides an application consuming MangoDBs
9+
* Provides an application consuming MangoDBs
1010

1111
## Pre-requisites
1212

@@ -35,7 +35,7 @@ The provider cluster we'll prepare in this section will provide a kube-bind comp
3535
3636
> What is MangoDB? It is just an example CRD to demonstrate kube-bind's capabilities and testing, without any workloads. See its definition in [/test/e2e/bind/fixtures/provider/crd-mangodb.yaml](/test/e2e/bind/fixtures/provider/crd-mangodb.yaml).
3737
38-
### Step one: create the Backend cluster
38+
### Step 1: Create the Backend Cluster
3939
4040
First, stash the host's external IP in a variable as we're going to use it often:
4141
@@ -68,7 +68,7 @@ EOF_BackendClusterDefinition
6868
6969
> Note: the port mappings will become clear later on, but in general this setup is solely specific to how Kind exposes ports of its nodes on the host. Specifically, we're exposing ports from containers through NodePort services on Kind's nodes, and to make these ports available on the host we need to map them to host's ports through `extraPortMappings`.
7070
71-
### Step two: deploy an identity provider
71+
### Step 2: Deploy an Identity Provider
7272
7373
kube-bind relies on OAuth2 for securely authenticating consumer and producer clusters. There are many ways to handle that in Kubernetes, for example with [dex IDP](https://github.com/dexidp/dex). It depends on cert-manager, which we'll deploy first:
7474
@@ -132,7 +132,7 @@ helm install \
132132
-f -
133133
```
134134
135-
### Step three: deploy the MangoDB kube-bind backend
135+
### Step 3: Deploy the MangoDB kube-bind Backend
136136
137137
Now we'll deploy a kube-bind--compatible backend for MangoDB. Let's start with kube-bind CRDs:
138138
@@ -147,9 +147,10 @@ kubectl apply -f test/e2e/bind/fixtures/provider/crd-mangodb.yaml
147147
```
148148
149149
To set up the MangoDB backend we'll need:
150-
* ServiceAccount and ClusterRoleBinding for kube-bind's user,
151-
* Deployment that runs the MangoDB backend
152-
* Service that exposes the backend's address
150+
151+
* `ServiceAccount` and `ClusterRoleBinding` for kube-bind's user,
152+
* `Deployment` that runs the MangoDB backend
153+
* `Service` that exposes the backend's address
153154
154155
```sh
155156
kubectl create namespace backend
@@ -203,7 +204,7 @@ replicaset.apps/mangodb-6ff44cbbf 1 1 1 100s
203204
204205
The App cluster will consume MangoDB CRs provided by the Backend.
205206
206-
### Step one: create the App cluster
207+
### Step 1: Create the App Cluster
207208
208209
Again, let's start by stashing the host's external IP in a variable as we're going to use it often (possibly the same one as for the Backend cluster):
209210
@@ -223,7 +224,7 @@ networking:
223224
EOF_AppClusterDefinition
224225
```
225226
226-
### Binding MangoDB backend
227+
### Step 2: Bind the MangoDB Backend
227228
228229
Now we'll bring in MangoDB CRDs from the Backend cluster (you can run `kubectl get crds` to see there are none yet):
229230
@@ -241,11 +242,13 @@ To authenticate, visit in your browser:
241242
```
242243
243244
The client is now waiting for you to visit the address similar to the one displayed in the output above. After completing the steps to create an OAuth2 token, it is then used by the kube-bind backend to pass the ServiceAccount's kubeconfig (in the Backend cluster) to the App cluster securely:
245+
244246
1. on the "Log in to dex" landing page, select "Log in with Example",
245247
2. on the "Grant Access" page, click the "Grant Access" button,
246248
3. lastly, click "Bind" when the page displays the mangodb resource.
247249
248250
Go back to the terminal where `kubectl bind` command was run, and you should see the following output:
251+
249252
```
250253
🔑 Successfully authenticated to http://${BACKEND_HOST_IP}:8080/export
251254
🔒 Created secret kube-bind/kubeconfig-x9bd5 for host https://${BACKEND_HOST_IP}:34595, namespace kube-bind-gfsqn
@@ -260,7 +263,7 @@ NAME PROVIDER READY MESSAGE
260263
apiservicebinding.kube-bind.io/mangodbs.mangodb.com False Pending 0s
261264
```
262265
263-
### Step two: demo time!
266+
### Step 3: Demo Time!
264267
265268
Let's see if we have CRDs for the MangoDB resource:
266269
@@ -288,6 +291,7 @@ kubectl describe mangodb my-db
288291
```
289292
290293
And finally, switch to the backend cluster and see that the CR is mirrored there:
294+
291295
```sh
292296
$ kubectl config use-context kind-backend
293297
Switched to context "kind-backend".
@@ -312,7 +316,7 @@ Spec:
312316
Events: <none>
313317
```
314318
315-
### Step three: clean up
319+
### Step 4: Clean up
316320
317321
Once you're done, you may clean up the setup simply by deleting the two kind clusters:
318322

0 commit comments

Comments
 (0)