# Connecting Tools to the Cluster

Sometimes you need to use local tools like Web Browsers, Postman, or Database Clients, to interact with services that are only accessible from inside your cluster.

Instead of setting up complex port-forwards or VPNs, you can use `mirrord` to create a lightweight SOCKS5 tunnel. This allows any application that supports SOCKS5 to resolve internal DNS and connect to private cluster services as if it were running inside the cluster itself.

### Prerequisites

Install **microsocks** via your package manager.

* For macOS: `brew install microsocks`
* For Ubuntu/Debian: `apt install microsocks`

### Setup

Regardless of which tool you are connecting, the first step is to establish the tunnel.

1. Start the proxy by running one of the following commands in your terminal:

* `mirrord exec microsocks` to run targetless in the default namespace
* `mirrord exec -t deployment/my-deployment microsocks` to target a specific deployment
* `mirrord exec -a my-namespace microsocks` to run within a specific namespace

2. Verify the proxy is working. microsocks listens on `127.0.0.1:1080` by default. Try calling a service health endpoint in your kubernetes cluster using `curl --socks5 socks5h://127.0.0.1:1080 <svc>.<namespace>.svc.cluster.local/health`

### Tool Guides

Once the proxy is running, choose your tool below to configure the connection:

* [Web Browsing](/mirrord/docs/using-mirrord/connecting-tools/web-browsing.md) - Using mirrord to browse using cluster networking.
* [Postman](/mirrord/docs/using-mirrord/connecting-tools/postman.md) - Send API requests via postman to kubernetes services.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://metalbear.com/mirrord/docs/using-mirrord/connecting-tools.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
