Skip to content
This repository was archived by the owner on Nov 30, 2023. It is now read-only.

Commit 4be2d40

Browse files
authored
Improve Ingress example (#1574)
1 parent 0d5d901 commit 4be2d40

File tree

3 files changed

+13
-4
lines changed

3 files changed

+13
-4
lines changed

containers/kubernetes-helm-minikube/README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,10 @@ When configuring [Ingress](https://kubernetes.io/docs/concepts/services-networki
2929
However, GitHub Codespaces does not yet support this capability, so you'll need to use `kubectl` to forward the port to localhost. This adds minimal overhead since everything is on the same machine. E.g.:
3030

3131
```bash
32-
kubectl port-forward service/ingress-nginx 80:80
32+
minikube start
33+
minikube addons enable ingress
34+
# Run this to forward to localhost in the background
35+
nohup kubectl port-forward --pod-running-timeout=24h -n ingress-nginx service/ingress-nginx-controller :80 &
3336
```
3437

3538
## Using this definition with an existing folder

containers/kubernetes-helm/README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,10 @@ When configuring [Ingress](https://kubernetes.io/docs/concepts/services-networki
9393
However, GitHub Codespaces does not yet support this capability, so you'll need to use `kubectl` to forward the port to localhost. This adds minimal overhead since everything is on the same machine. E.g.:
9494

9595
```bash
96-
kubectl port-forward service/ingress-nginx 80:80
96+
minikube start
97+
minikube addons enable ingress
98+
# Run this to forward to localhost in the background
99+
nohup kubectl port-forward --pod-running-timeout=24h -n ingress-nginx service/ingress-nginx-controller :80 &
97100
```
98101

99102
## Using this definition with an existing folder

script-library/docs/kubectl-helm.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,17 @@ Or as a feature:
3636
|minikube SHA256| | `automatic`| SHA256 checksum to use to verify the minikube download. `automatic` will download the checksum. |
3737
|Non-root user| | `automatic`| Specifies a user in the container other than root that will be using the desktop. A value of `automatic` will cause the script to check for a user called `vscode`, then `node`, `codespace`, and finally a user with a UID of `1000` before falling back to `root`. |
3838

39-
## A note on ingress and port forwarding
39+
## A note on Ingress and port forwarding
4040

4141
When configuring [Ingress](https://kubernetes.io/docs/concepts/services-networking/ingress/) for your Kubernetes cluster, note that by default Kubernetes will bind to a specific interface's IP rather than localhost or all interfaces. This is why you need to use the Kubernetes Node's IP when connecting - even if there's only one Node as in the case of Minikube. Port forwarding in Remote - Containers will allow you to specify `<ip>:<port>` in either the `forwardPorts` property or through the port forwarding UI in VS Code.
4242

4343
However, GitHub Codespaces does not yet support this capability, so you'll need to use `kubectl` to forward the port to localhost. This adds minimal overhead since everything is on the same machine. E.g.:
4444

4545
```bash
46-
kubectl port-forward service/ingress-nginx 80:80
46+
minikube start
47+
minikube addons enable ingress
48+
# Run this to forward to localhost in the background
49+
nohup kubectl port-forward --pod-running-timeout=24h -n ingress-nginx service/ingress-nginx-controller :80 &
4750
```
4851

4952
## Usage

0 commit comments

Comments
 (0)