Skip to content
Snippets Groups Projects
Commit 77135ac0 authored by Lukáš Daubner's avatar Lukáš Daubner :radioactive:
Browse files

fixed migration description

parent 9c1c2d7d
No related branches found
No related tags found
No related merge requests found
Pipeline #215263 passed
...@@ -137,11 +137,19 @@ ...@@ -137,11 +137,19 @@
key: connectionString key: connectionString
... ...
7. Deploy database 7. Deploy database
* Expose ``pv179-mssql-svc`` by setting ``type: LoadBalancer``
* Execute ``kubectl apply -f .`` in ``./k8s/sqlserver`` * Execute ``kubectl apply -f .`` in ``./k8s/sqlserver``
* Get External IP of the service
```powershell
kubectl get services
```
* Deploy migration on kubernetes-hosted database * Deploy migration on kubernetes-hosted database
```powershell ```powershell
$env:DemoDockerDeployment_Database__ConnectionString="Data Source=pv179-mssql-svc.<YOUR_NAMESPACE>.svc.cluster.local;Database=demo;User Id=sa;Password=MyC0m9l&xP@ssw0rd;" $env:DemoDockerDeployment_Database__ConnectionString="Data Source=<EXTERNAL_IP>,<SERVICE_PORT>;Database=demo;User Id=sa;Password=MyC0m9l&xP@ssw0rd;"
cd .\Demo.DockerDeployment\Server\ cd .\Demo.DockerDeployment\Server\
dotnet ef database update dotnet ef database update
``` ```
* Revert the exposure ``pv179-mssql-svc`` by setting ``type: ClusterIP``
* Execute ``kubectl apply -f .`` in ``./k8s/sqlserver``
* NOTE: This is a dirty way of migrating. You can use K8s Jobs for migrations in cluster.
8. Enjoy 8. Enjoy
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment