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
- A Kubernetes cluster with `kubectl` configured to access it.
105
+
- Dapr v1.13+ installed on the Kubernetes cluster. Follow the instructions [here](https://docs.dapr.io/getting-started/install-dapr-kubernetes/).
106
+
- A Docker registry where you pushed the `DemoActor` image.
107
+
108
+
#### Deploy the Actor service
109
+
For quick deployment you can install dapr in dev mode using the following command:
110
+
111
+
```Bash
112
+
dapr init -k --dev
113
+
```
114
+
115
+
To deploy the `DemoActor` service to Kubernetes, you can use the provided Kubernetes manifest file `demo-actor.yaml` in the `DemoActor` project directory.
116
+
Before applying the manifest file, replace the image name in the manifest file with the image name you pushed to your Docker registry.
117
+
118
+
Part to update in `demo-actor.yaml`:
119
+
```YAML
120
+
image: <your-docker-registry>/demoactor:latest
121
+
```
122
+
123
+
To install the application in `default` namespace, run the following command:
124
+
125
+
``` Bash
126
+
kubectl apply -f demo-actor.yaml
127
+
```
128
+
129
+
This will deploy the `DemoActor` service to Kubernetes. You can check the status of the deployment by running:
130
+
131
+
``` Bash
132
+
kubectl get pods -n default --watch
133
+
```
134
+
135
+
The manifest create 2 services:
136
+
137
+
- `demoactor` service: The service that hosts the `DemoActor` actor.
138
+
- `demoactor-dapr` service: The service that hosts the Dapr sidecar for the `DemoActor` actor.
139
+
140
+
### Make client calls to the deployed Actor service
141
+
To make client calls to the deployed `DemoActor` service, you can use the `ActorClient` project.
142
+
Before running the client, update the `DAPR_HTTP_PORT` environment variable in the `ActorClient` project directory to the port on which Dapr is running in the Kubernetes cluster.
143
+
144
+
On Linux, MacOS:
145
+
``` Bash
146
+
export DAPR_HTTP_PORT=3500
147
+
```
148
+
149
+
Than port-forward the `DemoActor` service to your local machine:
150
+
151
+
``` Bash
152
+
kubectl port-forward svc/demoactor 3500:3500
153
+
```
154
+
155
+
Now you can run the client project from the `ActorClient` directory:
0 commit comments