@@ -60,14 +60,13 @@ Let’s look at an example of creating a multi-instance WordPress Service using
60
60
```
61
61
wget https://github.com/cloud-ark/kubeplus/raw/master/kubeplus-kubectl-plugins.tar.gz
62
62
tar -zxvf kubeplus-kubectl-plugins.tar.gz
63
- export KUBEPLUS_HOME=`pwd`
64
- export PATH=$KUBEPLUS_HOME/plugins:$PATH
63
+ export PATH=$(pwd)/plugins:$PATH
65
64
kubectl kubeplus commands
66
65
```
67
66
68
67
3 . Set the Namespace in which to deploy KubePlus
69
68
70
- ` export KUBEPLUS_NS=default `
69
+ ` export KUBEPLUS_NS=kubeplus-example `
71
70
72
71
4 . Create provider kubeconfig using provider-kubeconfig.py
73
72
@@ -78,7 +77,7 @@ Let’s look at an example of creating a multi-instance WordPress Service using
78
77
source venv/bin/activate
79
78
pip3 install -r requirements.txt
80
79
apiserver=`kubectl config view --minify -o jsonpath='{.clusters[0].cluster.server}'`
81
- python3 provider-kubeconfig.py -s $apiserver create $KUBEPLUS_NS
80
+ python3 provider-kubeconfig.py create $KUBEPLUS_NS -s $apiserver
82
81
deactivate
83
82
```
84
83
@@ -95,8 +94,8 @@ Let’s look at an example of creating a multi-instance WordPress Service using
95
94
96
95
```
97
96
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
98
- kubectl get resourcecompositions
99
- kubectl describe resourcecomposition wordpress-service-composition
97
+ kubectl get resourcecompositions -n $KUBEPLUS_NS
98
+ kubectl describe resourcecomposition wordpress-service-composition -n $KUBEPLUS_NS
100
99
```
101
100
102
101
If the status of the ` wordpress-service-composition ` indicates that the new CRD has been created successfully, verify it:
@@ -122,7 +121,7 @@ Let’s look at an example of creating a multi-instance WordPress Service using
122
121
9 . Check created WordpressService instances
123
122
124
123
```
125
- kubectl get wordpressservices
124
+ kubectl get wordpressservices -n $KUBEPLUS_NS
126
125
127
126
NAME AGE
128
127
wp-tenant1 86s
@@ -132,13 +131,13 @@ Let’s look at an example of creating a multi-instance WordPress Service using
132
131
10 . Check the details of created instance:
133
132
134
133
```
135
- kubectl describe wordpressservices wp-tenant1
134
+ kubectl describe wordpressservices wp-tenant1 -n $KUBEPLUS_NS
136
135
```
137
136
138
137
11 . Check created application resources. Notice that the ` WordpressService ` instance resources are deployed in a Namespace ` wp-tenant1 ` , which was created by KubePlus.
139
138
140
139
```
141
- kubectl appresources WordpressService wp-tenant1 –k kubeplus-saas-provider.json
140
+ kubectl appresources WordpressService wp-tenant1 –k kubeplus-saas-provider.json -n $KUBEPLUS_NS
142
141
143
142
NAMESPACE KIND NAME
144
143
default WordpressService wp-tenant1
@@ -183,7 +182,7 @@ Let’s look at an example of creating a multi-instance WordPress Service using
183
182
kubectl delete wordpressservice wp-tenant2 --kubeconfig=kubeplus-saas-provider.json
184
183
kubectl delete resourcecomposition wordpress-service-composition --kubeconfig=kubeplus-saas-provider.json
185
184
helm delete kubeplus -n $KUBEPLUS_NS
186
- python3 provider-kubeconfig.py delete $KUBEPLUS_NS
185
+ python3 provider-kubeconfig.py delete -n $KUBEPLUS_NS
187
186
```
188
187
189
188
<!--
0 commit comments