Skip to content

Commit 239043a

Browse files
Add step to enable external access for AWS traefik ingress (#170)
1 parent 8aec28a commit 239043a

File tree

1 file changed

+11
-8
lines changed

1 file changed

+11
-8
lines changed

deploy-eks.md

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ The Riva Speech Skills Helm chart is designed to automate deployment to a Kubern
154154
155155
Now that the Riva service is running, the cluster needs a mechanism to route requests into Riva.
156156
157-
In the default `values.yaml` of the `riva-api` Helm chart, `service.type` was set to `LoadBalancer`, which would have automatically created an AWS Classic Load Balancer to direct traffic into the Riva service. Instead, the open-source [Traefik](https://doc.traefik.io/traefik/) edge router will serve this purpose.
157+
If the `service.type` is set to `LoadBalancer` in the `values.yaml` of the `riva-api` Helm chart, this would have automatically created an AWS Classic Load Balancer to direct traffic into the Riva service. Instead, the open-source [Traefik](https://doc.traefik.io/traefik/) edge router will serve this purpose.
158158

159159
1. Download and untar the Traefik Helm chart.
160160

@@ -167,7 +167,8 @@ In the default `values.yaml` of the `riva-api` Helm chart, `service.type` was se
167167

168168
2. Modify the `traefik/values.yaml` file.
169169

170-
1. Change `service.type` from `LoadBalancer` to `ClusterIP`. This exposes the service on a cluster-internal IP.
170+
1. Set `service.type` to `LoadBalancer` to expose the service on a external IP accessible from outside the cluster.
171+
If the `service.type` is set to `ClusterIP`, the service will only be exposed on a cluster-internal IP.
171172

172173
2. Set `nodeSelector` to `{ eks.amazonaws.com/nodegroup: cpu-linux-lb }`. Similar to what you did for the Riva API service,
173174
this tells the Traefik service to run on the `cpu-linux-lb` nodegroup.
@@ -182,9 +183,11 @@ In the default `values.yaml` of the `riva-api` Helm chart, `service.type` was se
182183
An [IngressRoute](https://doc.traefik.io/traefik/routing/providers/kubernetes-crd/) enables the Traefik load balancer to
183184
recognize incoming requests and distribute them across multiple `riva-api` services.
184185

185-
When you deployed the `traefik` Helm chart above, Kubernetes automatically created a local DNS entry for that service: `traefik.default.svc.cluster.local`. The IngressRoute definition below matches these DNS entries and directs requests to the `riva-api` service. You can modify the entries to support a different DNS arrangement, depending on your requirements.
186+
If you deployed the above `traefik` Helm chart with `service.type` set to `ClusterIP`, Kubernetes automatically created a local DNS entry for that service: `traefik.default.svc.cluster.local`. If you deployed the above `traefik` Helm chart with `service.type` set to `LoadBalancer`, Kubernetes automatically created an external DNS entry for that service which can be obtained from `kubectl get svc` command, e.g. `a7153b60c6e7a44dab6f681d15e111b5-2140342794.us-west-2.elb.amazonaws.com`.
186187

187-
1. Create the following `riva-ingress.yaml` file:
188+
The IngressRoute definition below matches these DNS entries and directs requests to the `riva-api` service. You can modify the entries to support a different DNS arrangement, depending on your requirements.
189+
190+
1. Create the following `riva-ingress.yaml` file. You need to replace `<local_or_external_IP>` with the local or external DNS entry mentioned in the above instruction.
188191

189192
```yaml
190193
apiVersion: traefik.containo.us/v1alpha1
@@ -195,7 +198,7 @@ In the default `values.yaml` of the `riva-api` Helm chart, `service.type` was se
195198
entryPoints:
196199
- web
197200
routes:
198-
- match: "Host(`traefik.default.svc.cluster.local`)"
201+
- match: "Host(`<local_or_external_IP>`)"
199202
kind: Rule
200203
services:
201204
- name: riva-api
@@ -208,7 +211,7 @@ In the default `values.yaml` of the `riva-api` Helm chart, `service.type` was se
208211
kubectl apply -f riva-ingress.yaml
209212
```
210213

211-
The Riva service is now able to serve gRPC requests from within the cluster at the address `traefik.default.svc.cluster.local`. If you are planning to deploy your own client application in the cluster to communicate with Riva, you can send requests to that address. In the next section, you will deploy a Riva sample client and use it to test the deployment.
214+
The Riva service is now able to serve gRPC requests from within or outside the cluster, depending on the `service.type` field, at the local or external address as mentioned before. If you are planning to deploy your own client application in the cluster to communicate with Riva, you can send requests to that address. In the next section, you will deploy a Riva sample client and use it to test the deployment.
212215

213216
## Deploying a Sample Client
214217

@@ -253,12 +256,12 @@ Riva provides a container with a set of pre-built sample clients to test the Riv
253256
kubectl exec --stdin --tty $cpod /bin/bash
254257
```
255258

256-
4. From inside the shell of the client pod, run the sample ASR client on an example `.wav` file. Specify the `traefik.default.svc.cluster.local` endpoint, with port 80, as the service address.
259+
4. From inside the shell of the client pod, run the sample ASR client on an example `.wav` file. Specify the `<local_or_external_IP>` endpoint as mentioned before, with port 80, as the service address.
257260
```bash
258261
riva_streaming_asr_client \
259262
--audio_file=/opt/riva/wav/en-US_sample.wav \
260263
--automatic_punctuation=true \
261-
--riva_uri=traefik.default.svc.cluster.local:80
264+
--riva_uri=<local_or_external_IP>:80
262265
```
263266

264267
## Scaling the cluster

0 commit comments

Comments
 (0)