Updated 10.1 Deploying to Kubernetes (AKS and local) using Helm Charts (markdown)
parent
d2776bfb46
commit
036588f281
@ -323,3 +323,54 @@ aae88fd2d810 d69a5113ceae "docker-entrypoint.s…"
|
|||||||
65d49ca9589d bbed8d0e01c1 "docker-entrypoint.s…" 2 hours ago Up 2 hours k8s_nosql-data_eshop-nosql-data-579c9d89f8-mtt95_default_3b9c1f89-e67f-11e8-b4b6-00155d016146_0
|
65d49ca9589d bbed8d0e01c1 "docker-entrypoint.s…" 2 hours ago Up 2 hours k8s_nosql-data_eshop-nosql-data-579c9d89f8-mtt95_default_3b9c1f89-e67f-11e8-b4b6-00155d016146_0
|
||||||
090e0dde2ec4 bbe2822dfe38 "/opt/mssql/bin/sqls…" 2 hours ago Up 2 hours k8s_sql-data_eshop-sql-data-5c4fdcccf4-bscdb_default_3afd29b8-e67f-11e8-b4b6-00155d016146_0
|
090e0dde2ec4 bbe2822dfe38 "/opt/mssql/bin/sqls…" 2 hours ago Up 2 hours k8s_sql-data_eshop-sql-data-5c4fdcccf4-bscdb_default_3afd29b8-e67f-11e8-b4b6-00155d016146_0
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Known issues
|
||||||
|
|
||||||
|
Login from the webmvc results in following error: HttpRequestException: Response status code does not indicate success: 404 (Not Found).
|
||||||
|
|
||||||
|
The reason is because MVC needs to access the Identity Server from both outside the container (browser) and inside the container (C# code). Thus, the configuration uses always the *external url* of the Identity Server, which in this case is just `http://localhost/identity-api`. But this external url is incorrect when used from C# code, and the web mvc can't access the identity api. This is the only case when this issue happens (and is the reason why we use 10.0.75.1 for local address in web mvc in local development mode)
|
||||||
|
|
||||||
|
Solving this requires some manual steps:
|
||||||
|
|
||||||
|
From the `/k8s` folder run `kubectl apply -f .\nginx-ingress\local-dockerk8s\mvc-fix.yaml`. This will create two additional ingresses (for MVC and Identity API) to any valid DNS that points to your machine. This enable the use of 10.75.0.1 IP.
|
||||||
|
|
||||||
|
Update the configmap of Web MVC by typing (**line breaks are mandatory**):
|
||||||
|
|
||||||
|
```
|
||||||
|
kubectl patch cm cfg-eshop-webmvc --type strategic --patch @'
|
||||||
|
data:
|
||||||
|
urls__IdentityUrl: http://10.0.75.1/identity
|
||||||
|
urls__mvc: http://10.0.75.1/webmvc
|
||||||
|
'@
|
||||||
|
```
|
||||||
|
|
||||||
|
Update the configmap of Identity API by typing (**line breaks are mandatory**):
|
||||||
|
|
||||||
|
```
|
||||||
|
kubectl patch cm cfg-eshop-identity-api --type strategic --patch @'
|
||||||
|
data:
|
||||||
|
mvc_e: http://10.0.75.1/webmvc
|
||||||
|
'@
|
||||||
|
```
|
||||||
|
|
||||||
|
Restart the SQL Server pod to ensure the database is recreated again:
|
||||||
|
|
||||||
|
```
|
||||||
|
kubectl delete pod --selector app=sql-data
|
||||||
|
```
|
||||||
|
|
||||||
|
Wait until SQL Server pod is ready to accept connections and then restart all other pods:
|
||||||
|
|
||||||
|
```
|
||||||
|
kubectl delete pod --selector="app!=sql-data"
|
||||||
|
```
|
||||||
|
|
||||||
|
**Note:** Pods are deleted to ensure the databases are recreated again, as identity api stores its client names and urls in the database.
|
||||||
|
|
||||||
|
Now, you can access the MVC app using: `http://10.0.75.1/webmvc`. All other services (like SPA) must be accessed using `http://localhost`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user