@@ -76,6 +76,8 @@ $ npm run build-css
76
76
$ npm run start
77
77
```
78
78
79
+ Verify app is running and working correctly.
80
+
79
81
## Run the application using Docker
80
82
1 . [ Build the image] ( #1-build-the-image )
81
83
2 . [ Run the image] ( #2-run-the-image )
@@ -85,6 +87,8 @@ $ npm run start
85
87
86
88
2 . [ Install Docker CLI] ( https://docs.docker.com/install/ )
87
89
90
+ 3 . [ Retrieve and save your Docker user id] ( https://cloud.docker.com/ )
91
+
88
92
### 1. Build the image
89
93
90
94
In a terminal, run:
@@ -98,7 +102,7 @@ Your image should be listed by running:
98
102
$ docker images
99
103
```
100
104
101
- ### 1 . Run the image
105
+ ### 2 . Run the image
102
106
103
107
In a terminal, run:
104
108
@@ -108,7 +112,7 @@ $ docker run -p 3000:3000 -d $docker_username/deploy-react-kubernetes
108
112
109
113
You can now access the application at http://localhost:3000
110
114
111
- ### 2. Run the application on Kubernetes
115
+ ## Run the application on Kubernetes
112
116
113
117
1 . [ Build image.] ( #1-build-image )
114
118
2 . [ Deploy the application] ( #2-deploy-the-application )
@@ -118,7 +122,12 @@ You can now access the application at http://localhost:3000
118
122
119
123
2 . [ Install IBM Cloud CLI] ( https://console.bluemix.net/docs/cli/reference/bluemix_cli/get_started.html#getting-started )
120
124
121
- 3 . Log in to your IBM Cloud account
125
+ 3 . Log into your IBM Cloud account
126
+ ```
127
+ bx login
128
+ ```
129
+
130
+ If you have a federated ID, use bx login --sso to log in to the IBM Cloud CLI.
122
131
123
132
4 . Install the Container Registry plug-in.
124
133
```
@@ -144,15 +153,15 @@ $ bx cs cluster-config YOUR_CLUSTER_NAME
144
153
145
154
Copy and paste response in CLI
146
155
147
- 9 . Create a namespace
156
+ 9 . Choose a name for your first namespace, and create that namespace. Use this namespace for the rest of the Quick Start.
148
157
```
149
158
$ bx cr namespace-add YOUR_NAMESPACE
150
159
```
151
160
152
161
153
162
### 1. Build image
154
163
155
- In a terminal, run:
164
+ Build image in the IBM Container Registry:
156
165
```
157
166
$ bx cr build -t registry.<ibm_cloud_region>.bluemix.net/<your_namespace>/deploy-react-kubernetes .
158
167
```
@@ -161,7 +170,16 @@ $ bx cr build -t registry.<ibm_cloud_region>.bluemix.net/<your_namespace>/deploy
161
170
162
171
```
163
172
$ kubectl run deploy-react-kubernetes-deployment —-image=registry.<ibm_cloud_region>.bluemix.net/<your_namespace>/deploy-react-kubernetes
173
+ ```
164
174
175
+ To check how many pods are running on Kubernetes run the command:
176
+ ```
177
+ kubectl get pods
178
+ ```
179
+
180
+ Expose the app to the web by setting the port. Run the command:
181
+
182
+ ```
165
183
$ kubectl expose deployment/deploy-react-kubernetes-deployment
166
184
—-type=NodePort —-name=deploy-react-kubernetes-service —-port=3000
167
185
```
@@ -180,6 +198,14 @@ $ kubectl describe service deploy-react-kubernetes-service
180
198
181
199
You can now access the application at http://IP_ADDRESS:NODE_PORT
182
200
201
+ ## Run the application on Kubernetes with a yaml file
202
+
203
+ Note: Follow the prerequisites in 'Run the application on Kubernetes section' before executing command below.
204
+
205
+ ```
206
+ kubectl create -f deployment.yaml
207
+ ```
208
+
183
209
# Sample output
184
210
185
211
<img width =" 1415 " alt =" screen shot 2017年03月13日 at 6 14 10 pm " src =" https://cloud.githubusercontent.com/assets/18426780/23879083/fa0df756-0818-11e7-8569-469367b84280.png " >
0 commit comments