Skip to content

Commit 89785bd

Browse files
committed
Update kubernetes docs
1 parent e3ec974 commit 89785bd

File tree

1 file changed

+32
-13
lines changed

1 file changed

+32
-13
lines changed

docs/kubernetes.md

Lines changed: 32 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,9 @@ description: A Helm chart to deploy Cinema project in Kubernetes
7979
# chart type
8080
type: application
8181
# chart version
82-
version: 0.1.0
82+
version: 0.2.0
8383
# cinema app version
84-
appVersion: "v2.0.1"
84+
appVersion: "v2.1.0"
8585
dependencies:
8686
- condition: mongodb.enabled
8787
name: mongodb
@@ -95,9 +95,11 @@ dependencies:
9595
version: 0.x.x
9696
- name: bookings
9797
version: 0.x.x
98+
- name: website
99+
version: 0.x.x
98100
```
99101

100-
Dependencies like `users`, `movies`, `showtimes` and `bookings` are charts located inside `charts` folder, and `mongodb` dependency came from Bitnami repository.
102+
Dependencies like `website`, `users`, `movies`, `showtimes` and `bookings` are charts located inside `charts` folder, and `mongodb` dependency came from Bitnami repository.
101103

102104
First of all is needed update helm dependencies
103105

@@ -107,12 +109,13 @@ $ helm dependency update charts/cinema
107109
Getting updates for unmanaged Helm repositories...
108110
...Successfully got an update from the "https://charts.bitnami.com/bitnami" chart repository
109111
Update Complete. ⎈Happy Helming!
110-
Saving 5 charts
112+
Saving 6 charts
111113
Downloading mongodb from repo https://charts.bitnami.com/bitnami
112114
Dependency users did not declare a repository. Assuming it exists in the charts directory
113115
Dependency movies did not declare a repository. Assuming it exists in the charts directory
114116
Dependency showtimes did not declare a repository. Assuming it exists in the charts directory
115117
Dependency bookings did not declare a repository. Assuming it exists in the charts directory
118+
Dependency website did not declare a repository. Assuming it exists in the charts directory
116119
Deleting outdated charts
117120
```
118121

@@ -123,7 +126,7 @@ $ helm upgrade cinema --install ./charts/cinema
123126

124127
Release "cinema" does not exist. Installing it now.
125128
NAME: cinema
126-
LAST DEPLOYED: Mon Jan 18 15:39:01 2021
129+
LAST DEPLOYED: Wed Feb 24 20:03:09 2021
127130
NAMESPACE: default
128131
STATUS: deployed
129132
REVISION: 1
@@ -135,7 +138,7 @@ Then check the deployment status:
135138
$ helm list
136139

137140
NAME NAMESPACE REVISION UPDATED STATUS CHART APP VERSION
138-
cinema default 1 2021-01-18 15:39:01.74132 +0100 CET deployed cinema-0.1.0 v2.0.1
141+
cinema default 1 2021-02-24 20:03:09.305628 +0100 CET deployed cinema-0.2.0 v2.1.0
139142
```
140143

141144
## Check Cinema services status
@@ -144,11 +147,12 @@ cinema default 1 2021-01-18 15:39:01.74132 +0100 CET
144147
$ kubectl get po
145148

146149
NAME READY STATUS RESTARTS AGE
147-
cinema-bookings-57dd76b7bd-7g2hc 1/1 Running 0 104s
148-
cinema-mongodb-75854c5d9c-hlfz7 1/1 Running 0 104s
149-
cinema-movies-86cf88bb67-khp4h 1/1 Running 0 104s
150-
cinema-showtimes-86b68b6f49-p2h4x 1/1 Running 0 104s
151-
cinema-users-6969d54b86-72fgg 1/1 Running 0 104s
150+
cinema-bookings-64d56d595c-7vkgj 1/1 Running 0 47s
151+
cinema-mongodb-75854c5d9c-l9s2z 1/1 Running 0 47s
152+
cinema-movies-d9fd6f6cd-2l9lr 1/1 Running 0 47s
153+
cinema-showtimes-5575885ccb-pksxc 1/1 Running 0 47s
154+
cinema-users-9fb877fb7-zfsb2 1/1 Running 0 47s
155+
cinema-website-6896897d9-l4dxm 1/1 Running 0 47s
152156
```
153157

154158
## Populate mongodb cluster with information
@@ -182,9 +186,24 @@ It is recommended to use this test data to check the apis of the services
182186
2021-01-18T19:43:55.424+0000 16 document(s) restored successfully. 0 document(s) failed to restore.
183187
```
184188

185-
## Test APIs services
189+
## Test Cinema services
190+
191+
To consult the website or the APIs you can use the `port-forward` command to link the cluster service with the local ports
192+
193+
### Website
194+
195+
```bash
196+
$ kubectl port-forward svc/cinema-website 8000:80
197+
198+
Forwarding from 127.0.0.1:8000 -> 8000
199+
Forwarding from [::1]:8000 -> 8000
200+
```
201+
202+
Access the following link in your web browser: <http://localhost:8000/>
203+
204+
![website home page](images/website-home.jpg)
186205

187-
To consult the APIs you can use the `port-forward` command to link the cluster service with the local ports
206+
### APIs
188207

189208
```bash
190209
$ kubectl port-forward svc/cinema-users 4000:80

0 commit comments

Comments
 (0)