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