This demo shows how to run Dapr actors across two Kubernetes namespaces on a local kind cluster, simulating client/server traffic between namespaces. A smart-bulb actor service is deployed into two namespaces, and a client app in each namespace talks to its local actor; a Pusher-backed UI streams events from both namespaces to four browser tabs so you can watch the namespaced traffic side by side. The demo is intended for developers exploring multi-tenant or environment-isolation patterns with Dapr actors.
- Dapr CLI
- Kind cluster
- A free Pusher account
Copy the service/config.ini.example file to service/config.ini and fill in the values for your Pusher account.
Run the setup script:
./setup.shFollow the instructions on screen and run the port-forwarding commands. When the forwarding is set up, you can open four browser tabs to simulate a client and server app in two namespaces.
service/— Smart-bulb actor service (Python). Containssmartbulb_actor.py,smartbulb_actor_service.py,smartbulb_actor_interface.py, the FastAPI/Flask host,Dockerfile, andconfig.ini.example.client/— Client app (Python) that invokes the actor. Containsapp.py, the sharedsmartbulb_actor_interface.py, templates, and aDockerfile.deploy/— Kubernetes manifests for deploying the client and service into the two namespaces.setup.sh— Script that builds images, loads them into kind, and applies the manifests.demo.gif— Recording of the demo in action.
Join the Dapr Discord for Q&A and chat with other community members!
