This lab has been modernised but not yet verified end to end. Tell us if something breaks.
Operators
Lab Solution
My solution uses two custom resources:
- todo-list-queue.yaml - a NatsCluster object with the name
todo-list-queuewhich will become the Service name
- todo-list-db.yaml - password Secret and MysqlCluster with the expected name
todo-db
Create the resources:
kubectl apply -f labs/operators/solutionCheck the message queue gets created:
kubectl get po,svc -l app=natsYou may need to restart the message handler if it's in a backoff state:
kubectl rollout restart deploy todo-save-handler
kubectl logs -l app=todo-list,component=save-handlerCheck the database gets created:
kubectl get po,svc -l app.kubernetes.io/instance=todo-dbTry the app at http://localhost:30028
- Add a new item
- Refresh list