diff --git a/README.md b/README.md index 1a53a3abdd28d1569647cb95b31978bda0affe97..1b2cfd053ca1ae3082aec031d8e56ab1341a139d 100644 --- a/README.md +++ b/README.md @@ -137,11 +137,19 @@ key: connectionString ... 7. Deploy database + * Expose ``pv179-mssql-svc`` by setting ``type: LoadBalancer`` * Execute ``kubectl apply -f .`` in ``./k8s/sqlserver`` + * Get External IP of the service + ```powershell + kubectl get services + ``` * Deploy migration on kubernetes-hosted database ```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\ 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 \ No newline at end of file