Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added static/img/k8s-proxy-connect-cluster-ingress.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/img/k8s-proxy-connect-cluster-tunnel.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/img/k8s-proxy-egress-no-route.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/img/k8s-proxy-egress-only-active.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
341 changes: 341 additions & 0 deletions versioned_docs/version-4.0.0/quickstart/k8s-proxy-egress-only.md

Large diffs are not rendered by default.

46 changes: 36 additions & 10 deletions versioned_docs/version-4.0.0/quickstart/k8s-proxy.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@ text: "Apply the Kubernetes manifests with kubectl apply -f k8s/, wait until all
},
{
name: "Connect your cluster in the Keploy Dashboard",
text: "In app.keploy.io, open Integration Testing → Clusters, add the cluster, and provide its name and ingress URL so the proxy can observe live traffic.",
text: "In app.keploy.io, open Integration Testing → Clusters, add the cluster, and choose how Keploy reaches it — the default Keploy tunnel needs no inbound access, or select Ingress URL and provide the URL where the agent is published.",
},
{
name: "Install the Keploy Proxy via Helm",
text: "Run the Helm command shown in the dashboard to install the Keploy Proxy into the keploy namespace, then port-forward svc/k8s-proxy (kubectl port-forward -n keploy svc/k8s-proxy 8080:8080).",
text: "Run the Helm command shown in the dashboard to install the Keploy Proxy into the keploy namespace. On the default Keploy tunnel path the agent dials out and is ready once its pods are Running; only the Ingress URL path needs kubectl port-forward -n keploy svc/k8s-proxy 8080:8080.",
},
{
name: "Record live traffic",
Expand Down Expand Up @@ -216,17 +216,38 @@ https://app.keploy.io
Provide the following information:

- **Cluster Name**: `ecommerce`
- **Ingress URL**:

```
http://localhost:8080
```
This field is optional. Leave it blank and Keploy names the cluster for you.

<img src="https://keploy-devrel.s3.us-west-2.amazonaws.com/k8s-proxy/cluster_config.png" alt="Sample Keploy K8s proxy" width="100%" style={{ borderRadius: '5px' }}/>
- **How should Keploy reach this cluster?**: leave this on its default,
**Keploy tunnel — the agent dials out (no inbound access needed)**.

This allows the Keploy Proxy to observe and record live traffic from your Kubernetes application.
The proxy opens one outbound connection to Keploy over ordinary HTTPS, and the
dashboard reaches it back down that connection. You need no public hostname, no
TLS certificate, no LoadBalancer and no firewall rule — and there is no URL to
fill in, so there is nothing more to do in this step.

Note: For this quickstart, I am running it locally. If you are running your application in production, provide the necessary ingress URL.
![Connect Cluster dialog with Keploy tunnel selected as the default](/img/k8s-proxy-connect-cluster-tunnel.png)

For more on this path — the Helm values, the network requirements and what the
tunnel does and does not carry — see
[Connect a cluster without an ingress](./k8s-proxy-egress-only.md).

#### To use an ingress URL instead

Select **Ingress URL — I will expose the agent at a URL** and an **Ingress URL**
field appears. Give it the address the browser can reach the agent at — for this
local quickstart, `http://localhost:8080`; in production, whatever public URL
your Ingress, Gateway or LoadBalancer publishes.

Pick this when you want the browser to call the cluster directly. It is
**required for Self-hosted** deployments, which never dial out to Keploy Cloud —
selecting that deployment type forces this choice and disables the dropdown.

![Connect Cluster dialog with Ingress URL selected, showing the URL field](/img/k8s-proxy-connect-cluster-ingress.png)

On this path you also need the `kubectl port-forward` in step 5 below. Every
other step in this guide is identical either way.

### 4. Install the Keploy Proxy in your k8s Cluster

Expand Down Expand Up @@ -278,12 +299,17 @@ kubectl get pods -n keploy

<img src="https://keploy-devrel.s3.us-west-2.amazonaws.com/k8s-proxy/keploy_proxy.png" alt="Sample Keploy K8s proxy" width="100%" style={{ borderRadius: '5px' }}/>

Note: You need to port-forward the Keploy Proxy when running this setup on a local machine.
**Ingress path only.** If you chose **Ingress URL** in step 3 and are running
this setup on a local machine, port-forward the Keploy Proxy so the browser can
reach it at the address you gave:

```bash
kubectl port-forward -n keploy svc/k8s-proxy 8080:8080
```

On the default **Keploy tunnel** path you can skip this — the agent dials out, so
nothing needs to reach it from your machine.

### 6. Your Keploy Proxy is ready to record live traffic

Once the Keploy Proxy is installed, you can view the list of running pods in the dashboard.
Expand Down
1 change: 1 addition & 0 deletions versioned_sidebars/version-4.0.0-sidebars.json
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@
"collapsed": true,
"items": [
"quickstart/k8s-proxy",
"quickstart/k8s-proxy-egress-only",
"quickstart/k8s-proxy-developer-workflow",
"quickstart/k8s-proxy-llm-workflow",
"keploy-cloud/smart-set-agent",
Expand Down
Loading