Skip to content

Commit 19fb5ce

Browse files
Merge pull request #189 from splunk/ai-tier-ga-internal-docs
docs: document SSH SOCKS tunnel for accessing internal Splunk/SAIA
2 parents f85348f + d1026f7 commit 19fb5ce

2 files changed

Lines changed: 99 additions & 6 deletions

File tree

docs/deployment/k0s-quick-reference.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -430,12 +430,12 @@ kubectl get nodes -l splunk.ai/workload-type=gpu -o yaml | grep nvidia.com/gpu
430430
# → nvidia.com/gpu: "<count>" under both capacity and allocatable, per GPU node
431431
```
432432

433-
**Reach the in-cluster Splunk instance** via NodePort (default), LoadBalancer
434-
(MetalLB), or `kubectl port-forward` for quick access with no external
435-
exposure: [DEPLOYMENT_GUIDE.md — Internal Splunk Access](../../tools/cluster_setup/DEPLOYMENT_GUIDE.md#internal-splunk-access).
436-
437-
Once the cluster is healthy, install and onboard the **Splunk AI Assistant**
438-
app: [DEPLOYMENT_GUIDE.md — Install the Splunk AI Assistant App](../../tools/cluster_setup/DEPLOYMENT_GUIDE.md#install-the-splunk-ai-assistant-app).
433+
**Access the in-cluster Splunk instance and set up the SAIA app:**
434+
[DEPLOYMENT_GUIDE.md — Internal Splunk Access](../../tools/cluster_setup/DEPLOYMENT_GUIDE.md#internal-splunk-access)
435+
(NodePort, LoadBalancer, or `kubectl port-forward`; add
436+
[K0S_README.md — Remote workstation via SSH bastion (SOCKS tunnel)](../../tools/cluster_setup/K0S_README.md#finding-the-splunk-web-url)
437+
if your browser can't reach the cluster network directly), then
438+
[DEPLOYMENT_GUIDE.md — Install the Splunk AI Assistant App](../../tools/cluster_setup/DEPLOYMENT_GUIDE.md#install-the-splunk-ai-assistant-app).
439439

440440
> **Using an external Splunk Enterprise/Cloud instance instead of the
441441
> in-cluster one?** See

tools/cluster_setup/K0S_README.md

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1954,6 +1954,99 @@ kubectl port-forward -n "${NAMESPACE}" "svc/${SPLUNK_SERVICE}" 8000:8000
19541954

19551955
Open `http://localhost:8000` in your browser.
19561956

1957+
**Remote workstation via SSH bastion (SOCKS tunnel)**
1958+
1959+
Use this when your browser doesn't run on the same host as `kubectl` — the
1960+
cluster network is reachable only from the installer machine, and you're
1961+
browsing from your laptop. The **installer machine** is the admin workstation
1962+
from [Required Tools](#required-tools-on-admin-workstation): whatever host has
1963+
SSH reach to every cluster node and holds the kubeconfig (often a bastion or
1964+
EC2 instance, not your laptop) — it is not itself a cluster node. A plain
1965+
`kubectl port-forward` only helps if your browser runs on that same host; the
1966+
SOCKS proxy set up here also lets the browser reach other private cluster
1967+
addresses directly, e.g. the SAIA API endpoint from
1968+
[Onboarding to the AI Tier](#onboarding-to-the-ai-tier).
1969+
1970+
Placeholders used below — replace with your own values:
1971+
1972+
| Placeholder | Meaning |
1973+
|---|---|
1974+
| `<installer-ip>` | SSH-reachable address of the installer machine |
1975+
| `<ssh-user>` | SSH login user on the installer machine |
1976+
| `<ssh-key>` | Path to the SSH private key for the installer machine |
1977+
| `<kubeconfig-path>` | Kubeconfig path on the installer machine |
1978+
| `<saia-nodeport-addr>` | `<worker-node-ip>:<nodePort>` from [Onboarding to the AI Tier, Step 1](#onboarding-to-the-ai-tier) |
1979+
| `<tenant-id>` | Your SAIA tenant ID |
1980+
1981+
1. On the installer machine, start the port-forward and leave it running.
1982+
Reuse the `NAMESPACE`/`STANDALONE_NAME` from your cluster config if they
1983+
differ from the defaults shown here:
1984+
1985+
```bash
1986+
NAMESPACE=ai-platform
1987+
STANDALONE_NAME=splunk-standalone
1988+
SPLUNK_SERVICE="splunk-${STANDALONE_NAME}-standalone-service"
1989+
kubectl --kubeconfig <kubeconfig-path> -n "${NAMESPACE}" port-forward \
1990+
"svc/${SPLUNK_SERVICE}" 18002:8000 \
1991+
--address=127.0.0.1
1992+
```
1993+
1994+
2. From your workstation, open one SSH tunnel with both a local forward for
1995+
Splunk Web and a SOCKS proxy for everything else:
1996+
1997+
```bash
1998+
ssh -N \
1999+
-o ExitOnForwardFailure=yes \
2000+
-o ServerAliveInterval=30 \
2001+
-L 18002:127.0.0.1:18002 \
2002+
-D 127.0.0.1:1080 \
2003+
-i <ssh-key> \
2004+
<ssh-user>@<installer-ip>
2005+
```
2006+
2007+
Local port `18002` now reaches Splunk Web; local SOCKS port `1080` reaches
2008+
any other private cluster address.
2009+
2010+
3. Verify SOCKS access to the SAIA endpoint before opening a browser:
2011+
2012+
```bash
2013+
curl --socks5-hostname 127.0.0.1:1080 -i -X OPTIONS \
2014+
'http://<saia-nodeport-addr>/<tenant-id>/saia-api-v2/v2alpha1/metadata' \
2015+
-H 'Access-Control-Request-Headers: authorization,splunk-client,x-requested-with,x-stack-url' \
2016+
-H 'Access-Control-Request-Method: GET' \
2017+
-H 'Origin: http://localhost:18002'
2018+
```
2019+
2020+
Expect `HTTP/1.1 204 No Content`.
2021+
2022+
4. Launch an isolated Chrome profile routed through the SOCKS proxy, with
2023+
`localhost` traffic (Splunk Web) kept direct:
2024+
2025+
macOS:
2026+
2027+
```bash
2028+
open -na "Google Chrome" --args \
2029+
--user-data-dir=/tmp/<cluster-name>-chrome \
2030+
--proxy-server=socks5://127.0.0.1:1080 \
2031+
--proxy-bypass-list="localhost;127.0.0.1"
2032+
```
2033+
2034+
Linux (Ubuntu/RHEL admin workstation):
2035+
2036+
```bash
2037+
google-chrome --user-data-dir=/tmp/<cluster-name>-chrome \
2038+
--proxy-server=socks5://127.0.0.1:1080 \
2039+
--proxy-bypass-list="localhost;127.0.0.1"
2040+
```
2041+
2042+
5. In that Chrome instance, open `http://localhost:18002` (HTTP, not HTTPS)
2043+
— this is your Splunk Web session.
2044+
2045+
6. When [onboarding the AI Tier](#onboarding-to-the-ai-tier), use
2046+
`http://<saia-nodeport-addr>` as the SAIA API URL — it works both from
2047+
inside the pod (onboarding checks) and from the browser via the SOCKS
2048+
tunnel.
2049+
19572050
**Retrieve the admin password**
19582051

19592052
```bash

0 commit comments

Comments
 (0)