From 85b2c895f5b32f3c586ba3a9f34c8f0c49d8f668 Mon Sep 17 00:00:00 2001 From: Steven Morse Date: Thu, 12 Dec 2024 09:40:47 -0500 Subject: [PATCH] add website to ToC --- _data/navigation.yml | 2 ++ k8s/setting-up-website.md | 7 ++++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/_data/navigation.yml b/_data/navigation.yml index f57d8c0..9029c47 100644 --- a/_data/navigation.yml +++ b/_data/navigation.yml @@ -70,6 +70,8 @@ url: /hpc-gitbook/k8s/python_conda.html - title: Creating custom images url: /hpc-gitbook/k8s/creating-an-image.html + - title: Accessing a Pod from a Browser + url: /hpc-gitbook/k8s/setting-up-website.html - title: Setting up Torch url: /hpc-gitbook/k8s/envWithPod.html - title: One Pod Torch with Data diff --git a/k8s/setting-up-website.md b/k8s/setting-up-website.md index 5a77612..09dacb2 100644 --- a/k8s/setting-up-website.md +++ b/k8s/setting-up-website.md @@ -1,9 +1,9 @@ # Hosting a website on the cluster -This is an explanation of how to set up port forwarding so that you can view a website hosted on a pod in a local web browser. -The basic idea is that we will create a SOCKS5 proxy to tunnel into the cluster, then access the website via the pod's internal IP. +This is an explanation of how to set up port forwarding so that you can view a website hosted on a pod in a local web browser. The basic idea is that we will create a SOCKS5 proxy to tunnel into the cluster, then access the website via the pod's internal IP. This can be useful to, for example: test services running with a pod/deployment, or to access a Jupyter kernel running in a container from a browser on your local machine. -## Correctly exposing th application + +## Correctly exposing the application Ensure your Docker container is correctly serving your application. This will likely involve exposing a port in your Dockerfile @@ -87,4 +87,5 @@ kubectl get pod -o jsonpath="{.status.podIP}" ``` with the name of your pod. + Access this address in Chrome at the exposed port, `http://:`. You should see your site.