You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: cosmos-todo-list/README.md
+22-2Lines changed: 22 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -52,9 +52,13 @@ You can monitor their progress with:
52
52
```sh
53
53
watch kubectl get -n cosmosdb resourcegroup,databaseaccount,sqldatabase,sqldatabasecontainer
54
54
```
55
-
56
55
You can also find the resource group in the [Azure portal](https://portal.azure.com) and watch the Cosmos DB resources being created there.
57
56
57
+
It could take a few minutes for the Cosmos DB resources to be provisioned.
58
+
In that time you might see some `ResourceNotFound` errors, or messages indicating that the database account isn't ready, on the SQL database or container.
59
+
This is OK!
60
+
The operator will keep creating them once the account is available and the errors should eventually resolve themselves.
61
+
58
62
## Create the `cosmos-settings` secret
59
63
60
64
We need to provide the web application with access to the database.
@@ -64,6 +68,9 @@ COSMOS_DB_ACCOUNT="$(az cosmosdb show --resource-group aso-cosmos-demo --name sa
(Secret handling is an area we're still working on in ASO - in the future the operator should automatically get these details from Azure and create the secret itself once the database account is ready.)
83
+
(Secret handling is an area we're still working on in ASO - in the future the operator should automatically get these details from Azure and create the secret itself once the database account is ready. See [#1471](https://github.com/Azure/azure-service-operator/issues/1471) for more details.)
Now visiting [http://localhost:8080](http://localhost:8080) in your browser will hit the Cosmos DB application.
105
+
You can create todo items and mark them as complete!
106
+
107
+
Use the Cosmos DB account Data Explorer on the portal to expand the database and container, and you can see the todo-list items stored by the web app.
98
108
99
109
If you're interested in how the todo application uses the Cosmos DB API, the code is available [here](https://github.com/Azure-Samples/cosmos-dotnet-core-todo-app/tree/main/src).
110
+
111
+
## Clean up
112
+
113
+
When you're finished with the sample application you can clean all of the Kubernetes and Azure resources up by deleting the `cosmosdb` namespace in your cluster.
114
+
```sh
115
+
kubectl delete namespace cosmosdb
116
+
```
117
+
118
+
Kubernetes will delete the web application pod and the operator will delete the Azure resource group and all the Cosmos DB resources.
119
+
(Deleting a Cosmos DB account can take several minutes.)
0 commit comments