Skip to content

Commit 7825e63

Browse files
Updated getting-started with explanation of namespace to use
Fixes: #1418
1 parent 63d6876 commit 7825e63

File tree

1 file changed

+16
-11
lines changed

1 file changed

+16
-11
lines changed

examples/getting-started.md

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,21 @@
55

66
Let’s look at an example of creating a multi-instance WordPress Service using KubePlus. The WordPress service provider goes through the following steps on their cluster.
77

8-
**NOTE:** If you have not set up KubePlus, follow the [Installation](../README.md#installation) steps to set up KubePlus.
8+
**NOTE:**
9+
If you have not set up KubePlus, follow the [Installation](../README.md#installation) steps to set up KubePlus.
10+
Create the resourcecomposition instance and application CRD instances in the same namespace where KubePlus is deployed.
11+
KubePlus will ignore creation of resourcecomposition instance and application CRD instances if other namespaces are used.
12+
In the below steps, `KUBEPLUS_NS` is the namespace in which KubePlus is deployed.
13+
914

1015
### 1. Create Kubernetes CRD Representing WordPress Helm Chart
1116

1217
*The WordPress Helm chart can be specified as a [public URL](./examples/multitenancy/application-hosting/wordpress/wordpress-service-composition.yaml) or can be [available locally](./examples/multitenancy/application-hosting/wordpress/wordpress-service-composition-localchart.yaml).*
1318

1419
```sh
15-
kubectl create -f https://raw.githubusercontent.com/cloud-ark/kubeplus/master/examples/multitenancy/application-hosting/wordpress/wordpress-service-composition.yaml --kubeconfig=kubeplus-saas-provider.json
16-
kubectl get resourcecompositions
17-
kubectl describe resourcecomposition wordpress-service-composition
20+
kubectl create -f https://raw.githubusercontent.com/cloud-ark/kubeplus/master/examples/multitenancy/application-hosting/wordpress/wordpress-service-composition.yaml --kubeconfig=kubeplus-saas-provider.json -n $KUBEPLUS_NS
21+
kubectl get resourcecomposition -n $KUBEPLUS_NS
22+
kubectl describe resourcecomposition wordpress-service-composition -n $KUBEPLUS_NS
1823
```
1924

2025
If the status of the `wordpress-service-composition` indicates that the new CRD has been created successfully, verify it:
@@ -28,19 +33,19 @@ You should see `wordpressservices.platformapi.kubeplus` CRD registered.
2833
### 2. Create WordpressService Instance `wp-tenant1`
2934

3035
```sh
31-
kubectl create -f https://raw.githubusercontent.com/cloud-ark/kubeplus/master/examples/multitenancy/application-hosting/wordpress/tenant1.yaml --kubeconfig=kubeplus-saas-provider.json
36+
kubectl create -f https://raw.githubusercontent.com/cloud-ark/kubeplus/master/examples/multitenancy/application-hosting/wordpress/tenant1.yaml --kubeconfig=kubeplus-saas-provider.json -n $KUBEPLUS_NS
3237
```
3338

3439
### 3. Create WordpressService Instance `wp-tenant2`
3540

3641
```sh
37-
kubectl create -f https://raw.githubusercontent.com/cloud-ark/kubeplus/master/examples/multitenancy/application-hosting/wordpress/tenant2.yaml --kubeconfig=kubeplus-saas-provider.json
42+
kubectl create -f https://raw.githubusercontent.com/cloud-ark/kubeplus/master/examples/multitenancy/application-hosting/wordpress/tenant2.yaml --kubeconfig=kubeplus-saas-provider.json -n $KUBEPLUS_NS
3843
```
3944

4045
### 4. Check Created WordpressService Instances
4146

4247
```sh
43-
kubectl get wordpressservices
48+
kubectl get wordpressservices -n $KUBEPLUS_NS
4449

4550
NAME AGE
4651
wp-tenant1 86s
@@ -50,7 +55,7 @@ wp-tenant2 26s
5055
### 5. Check the Details of the Created Instance
5156

5257
```sh
53-
kubectl describe wordpressservices wp-tenant1
58+
kubectl describe wordpressservices wp-tenant1 -n $KUBEPLUS_NS
5459
```
5560

5661
### 6. Check Created Application Resources
@@ -99,9 +104,9 @@ Underlying Physical Resources consumed:
99104
### 8. Cleanup
100105

101106
```sh
102-
kubectl delete wordpressservice wp-tenant1 --kubeconfig=kubeplus-saas-provider.json
103-
kubectl delete wordpressservice wp-tenant2 --kubeconfig=kubeplus-saas-provider.json
104-
kubectl delete resourcecomposition wordpress-service-composition --kubeconfig=kubeplus-saas-provider.json
107+
kubectl delete wordpressservice wp-tenant1 --kubeconfig=kubeplus-saas-provider.json -n $KUBEPLUS_NS
108+
kubectl delete wordpressservice wp-tenant2 --kubeconfig=kubeplus-saas-provider.json -n $KUBEPLUS_NS
109+
kubectl delete resourcecomposition wordpress-service-composition --kubeconfig=kubeplus-saas-provider.json -n $KUBEPLUS_NS
105110
helm delete kubeplus -n $KUBEPLUS_NS
106111
python3 provider-kubeconfig.py delete $KUBEPLUS_NS
107112
```

0 commit comments

Comments
 (0)