Skip to content

Commit 59eb14e

Browse files
authored
docs: tweaks the ingress docs to have headings (#105)
Signed-off-by: ChrisJBurns <29541485+ChrisJBurns@users.noreply.github.com>
1 parent 75373de commit 59eb14e

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

docs/ingress.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,40 @@
11
# Setting up Ingress on a Local Kind Cluster
22

3-
> Disclaimer: ChrisB to refine when back home.
4-
5-
Prerequisites:
3+
## Prerequisites:
64
- Have a local Kind Cluster running
75
- Have an MCP server with the proxy workload fronting it (this can be achieved by running the `test-k8s-apply` Taskfile task. `task test-k8s-apply`)
86

7+
## Setting Up Ingress
8+
99
There should now be a local Kind cluster with an MCP server running and a ToolHive proxy running, in addition to an Nginx Ingress controller running and pending an ExternalIP.
1010

1111
To give the ingress controller an IP, we will run a local Kind Go binary that acts as a small LoadBalancer that gives IPs to ingress controllers inside of the Kind Cluster. This binary mimicks Cloud Providers LoadBalancers functionality for local Kind setups.
1212

13-
```
13+
```shell
1414
go install sigs.k8s.io/cloud-provider-kind@latest
1515
sudo ~/go/bin/cloud-provider-kind
1616
```
1717

1818
After a few moments, the ingress controller should be running and the service should have an external IP set for it. Run the below to get the IP and store it in a variable, and then curl the MCP server endpoint to see a connection.
1919

20-
```
20+
```shell
2121
$ LB_IP=$(kubectl get svc/ingress-nginx-controller -n ingress-nginx -o=jsonpath='{.status.loadBalancer.ingress[0].ip}')
2222
$ curl $LB_IP/sse
2323
event: endpoint
2424
data: http://172.20.0.3/messages?session_id=637d766e-354a-45b6-bc91-e153a35bc49f
2525
```
2626

27-
## Ingress with Local Hostname
27+
### Ingress with Local Hostname
2828

2929
In order to avoid using of the IP you can use a hostname instead of preferred. This can be achieved by modifying the `/etc/hosts` file to include a mapping for the load balancer IP to a friendly hostname.
3030

31-
```
31+
```shell
3232
sudo sh -c "echo '$LB_IP mcp-server.dev' >> /etc/hosts"
3333
```
3434

3535
Now when you curl that endpoint, it should connect as it did with the IP
3636

37-
```
37+
```shell
3838
$ curl mcp-server.dev/sse
3939
event: endpoint
4040
data: http://mcp-server.dev/messages?session_id=337e4d34-5fb0-4ccc-9959-fc382d5b4800

0 commit comments

Comments
 (0)