From 81f6627d5c8fee2309940363f047a75ca5504cc6 Mon Sep 17 00:00:00 2001 From: Itay Vallach Date: Sun, 6 Aug 2023 13:59:41 +0300 Subject: [PATCH] Update allow-external-access-to-containers.md --- .../allow-external-access-to-containers.md | 51 +++++++++---------- 1 file changed, 25 insertions(+), 26 deletions(-) diff --git a/docs/admin/runai-setup/config/allow-external-access-to-containers.md b/docs/admin/runai-setup/config/allow-external-access-to-containers.md index 6564d15769..18811c834c 100644 --- a/docs/admin/runai-setup/config/allow-external-access-to-containers.md +++ b/docs/admin/runai-setup/config/allow-external-access-to-containers.md @@ -37,37 +37,36 @@ To address this issue, Run:ai provides support for __host-based routing__. When To enable host-based routing you must perform the following steps: -1. Create a second DNS entry `*.`, pointing to the same IP as the original [Cluster URL](../cluster-setup/cluster-prerequisites.md#cluster-url) DNS. +1. Create a second DNS entry `*.`, pointing to the same IP as the original [Cluster URL](../cluster-setup/cluster-prerequisites.md#cluster-url) DNS. 2. Obtain a __star__ SSL certificate for this DNS. 3. Add the certificate as a secret: -=== "SaaS" - ``` - kubectl create secret tls runai-cluster-domain-star-tls-secret -n runai \ - --cert /path/to/fullchain.pem --key /path/to/private.pem - ``` - -=== "Self hosted" - ``` - kubectl create secret tls runai-cluster-domain-star-tls-secret -n runai-backend \ - --cert /path/to/fullchain.pem --key /path/to/private.pem - ``` - -4. Create an ingress rule to direct traffic: - -=== "SaaS" - ``` - kubectl patch ingress researcher-service-ingress -n runai --type json \ - --patch '[{ "op": "add", "path": "/spec/tls/-", "value": { "hosts": [ "*." ], "secretName": "runai-cluster-domain-star-tls-secret" } }]' - ``` - -=== "Self hosted" - ``` - kubectl patch ingress runai-backend-ingress -n runai-backend --type json \ - --patch '[{ "op": "add", "path": "/spec/tls/-", "value": { "hosts": [ "*." ], "secretName": "runai-cluster-domain-star-tls-secret" } }]' - ``` +``` +kubectl create secret tls runai-cluster-domain-star-tls-secret -n runai \ + --cert /path/to/fullchain.pem --key /path/to/private.pem +``` + +4. Create the following ingress rule: + +``` YAML +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: runai-cluster-domain-star-ingress + namespace: runai +spec: + ingressClassName: nginx + rules: + - host: '*.' + tls: + - hosts: + - '*.' + secretName: runai-cluster-domain-star-tls-secret +``` + +Replace `` as described above. 5. Edit Runaiconfig to generate the URLs correctly: