Skip to content

Commit 6dd0735

Browse files
vertex
Signed-off-by: Adrian Cole <[email protected]>
1 parent c56190f commit 6dd0735

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

example-apps/chatbot-rag-app/README.md

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,19 +93,26 @@ Then, import your `.env` file as a configmap like this:
9393
kubectl create configmap chatbot-rag-app-env --from-env-file=.env
9494
```
9595

96-
If you are using Vertex AI, make a secret for authentication:
96+
<details>
97+
<summary>To use Vertex AI, set `LLM_TYPE=vertex` in your `.env` and follow these steps</summary>
98+
The `api-frontend container` needs access to your Google Cloud credentials.
99+
Share your `application_default_credentials.json` as a Kubernetes secret:
97100
```bash
101+
# Logs you into Google Cloud and creates application_default_credentials.json
102+
gcloud auth application-default login
103+
# Adds your credentials to a Kubernetes secret named gcloud-credentials
98104
kubectl create secret generic gcloud-credentials \
99105
--from-file=application_default_credentials.json=$HOME/.config/gcloud/application_default_credentials.json
100106
```
107+
</details>
101108

102-
Now that your configuration is applied, create the chatbot-rag-app deployment
109+
Now that your configuration is applied, create the `chatbot-rag-app` deployment
103110
and service by applying this manifest:
104111
```bash
105112
kubectl apply -f k8s-manifest.yml
106113
```
107114

108-
Next, block until chatbot-rag-app is available.
115+
Next, block until `chatbot-rag-app` is available.
109116
```bash
110117
kubectl wait --for=condition=available --timeout=20m deployment/chatbot-rag-app
111118
```

example-apps/chatbot-rag-app/k8s-manifest.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@ spec:
3434
name: chatbot-rag-app-env
3535
volumeMounts: &volumeMounts
3636
- name: gcloud-credentials
37-
mountPath: /root/.config/application_default_credentials.json
37+
mountPath: /root/.config/
38+
subPath: application_default_credentials.json
3839
readOnly: true
3940
containers:
4041
- name: api-frontend

0 commit comments

Comments
 (0)