Skip to content

Commit 81f6627

Browse files
committed
Update allow-external-access-to-containers.md
1 parent 58955db commit 81f6627

File tree

1 file changed

+25
-26
lines changed

1 file changed

+25
-26
lines changed

docs/admin/runai-setup/config/allow-external-access-to-containers.md

Lines changed: 25 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -37,37 +37,36 @@ To address this issue, Run:ai provides support for __host-based routing__. When
3737

3838
To enable host-based routing you must perform the following steps:
3939

40-
1. Create a second DNS entry `*.<CLUSTER_URL>`, pointing to the same IP as the original [Cluster URL](../cluster-setup/cluster-prerequisites.md#cluster-url) DNS.
40+
1. Create a second DNS entry `*.<CLUSTER_URL>`, pointing to the same IP as the original [Cluster URL](../cluster-setup/cluster-prerequisites.md#cluster-url) DNS.
4141
2. Obtain a __star__ SSL certificate for this DNS.
4242

4343

4444
3. Add the certificate as a secret:
4545

46-
=== "SaaS"
47-
```
48-
kubectl create secret tls runai-cluster-domain-star-tls-secret -n runai \
49-
--cert /path/to/fullchain.pem --key /path/to/private.pem
50-
```
51-
52-
=== "Self hosted"
53-
```
54-
kubectl create secret tls runai-cluster-domain-star-tls-secret -n runai-backend \
55-
--cert /path/to/fullchain.pem --key /path/to/private.pem
56-
```
57-
58-
4. Create an ingress rule to direct traffic:
59-
60-
=== "SaaS"
61-
```
62-
kubectl patch ingress researcher-service-ingress -n runai --type json \
63-
--patch '[{ "op": "add", "path": "/spec/tls/-", "value": { "hosts": [ "*.<CLUSTER_URL>" ], "secretName": "runai-cluster-domain-star-tls-secret" } }]'
64-
```
65-
66-
=== "Self hosted"
67-
```
68-
kubectl patch ingress runai-backend-ingress -n runai-backend --type json \
69-
--patch '[{ "op": "add", "path": "/spec/tls/-", "value": { "hosts": [ "*.<CLUSTER_URL>" ], "secretName": "runai-cluster-domain-star-tls-secret" } }]'
70-
```
46+
```
47+
kubectl create secret tls runai-cluster-domain-star-tls-secret -n runai \
48+
--cert /path/to/fullchain.pem --key /path/to/private.pem
49+
```
50+
51+
4. Create the following ingress rule:
52+
53+
``` YAML
54+
apiVersion: networking.k8s.io/v1
55+
kind: Ingress
56+
metadata:
57+
name: runai-cluster-domain-star-ingress
58+
namespace: runai
59+
spec:
60+
ingressClassName: nginx
61+
rules:
62+
- host: '*.<CLUSTER_URL>'
63+
tls:
64+
- hosts:
65+
- '*.<CLUSTER_URL>'
66+
secretName: runai-cluster-domain-star-tls-secret
67+
```
68+
69+
Replace `<CLUSTER_URL>` as described above.
7170

7271
5. Edit Runaiconfig to generate the URLs correctly:
7372

0 commit comments

Comments
 (0)