Skip to content

feat: Add docs on exposing the kubernetes-api with the ngrok-operator#2078

Draft
jonstacks wants to merge 1 commit intomainfrom
stacks/expose-k8s-api-docs
Draft

feat: Add docs on exposing the kubernetes-api with the ngrok-operator#2078
jonstacks wants to merge 1 commit intomainfrom
stacks/expose-k8s-api-docs

Conversation

@jonstacks
Copy link
Copy Markdown
Contributor

Adds documentation on how to expose the Kubernetes API using the ngrok-operator

Signed-off-by: Jonathan Stacks <jonstacks@users.noreply.github.com>
@jonstacks jonstacks self-assigned this Mar 26, 2026
@mintlify
Copy link
Copy Markdown

mintlify bot commented Mar 26, 2026

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
ngrok 🟢 Ready View Preview Mar 26, 2026, 7:08 PM

description: Learn how to expose the Kubernetes API server externally using the ngrok Kubernetes Operator, covering each Kubernetes authentication strategy and how to update your kubeconfig.
---

Exposing the Kubernetes API server through ngrok lets you reach your cluster's control plane from anywhere — no VPN, no bastion host, no firewall rules required.
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [vale] reported by reviewdog 🐶
[StyleRules.EmDash] Don't put a space before or after a dash.

- The [ngrok Kubernetes Operator installed](/k8s/installation) in your cluster
- `kubectl` configured with access to the cluster you want to expose

## Kubernetes Authentication Strategies
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [vale] reported by reviewdog 🐶
[StyleRules.Headings] 'Kubernetes Authentication Strategies' should use sentence-style capitalization.

| Authentication Strategy | kubeconfig Indicator | ngrok Compatible? | Required Endpoint Type |
|---|---|---|---|
| Bearer Token (Service Account, Static) | `token` or `tokenFile` field | ✅ Yes | HTTPS |
| OIDC Token (via `exec` plugin) | `exec` block (e.g. `kubelogin`) | ✅ Yes | HTTPS |
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [vale] reported by reviewdog 🐶
[StyleRules.Latin] Use 'for example' instead of 'e.g.'.

|---|---|---|---|
| Bearer Token (Service Account, Static) | `token` or `tokenFile` field | ✅ Yes | HTTPS |
| OIDC Token (via `exec` plugin) | `exec` block (e.g. `kubelogin`) | ✅ Yes | HTTPS |
| Cloud Provider Token (EKS, GKE, AKS) | `exec` block (e.g. `aws`, `gke-gcloud-auth-plugin`) | ✅ Yes | HTTPS |
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [vale] reported by reviewdog 🐶
[StyleRules.Latin] Use 'for example' instead of 'e.g.'.


**HTTPS endpoints** terminate TLS at the ngrok edge. The `Authorization: Bearer <token>` header passes through transparently to the Kubernetes API server, so any token-based strategy works.

**TLS endpoints** pass the raw TLS stream through to the upstream without ngrok terminating it. This means the full TLS handshake — including the client certificate — travels end-to-end from `kubectl` to the Kubernetes API server. This is required for X.509 client certificate authentication.
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [vale] reported by reviewdog 🐶
[StyleRules.EmDash] Don't put a space before or after a dash.


If you use HTTPS with client certificate auth, ngrok will terminate TLS before the client cert reaches the API server and authentication will fail.

## Identifying Your Authentication Strategy
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [vale] reported by reviewdog 🐶
[StyleRules.Headings] 'Identifying Your Authentication Strategy' should use sentence-style capitalization.


→ Use the **[TLS passthrough setup](#scenario-2-x509-client-certificate-or-exec-plugin-producing-a-certificate-tls-passthrough)**.

## Scenario 1: Bearer Token or Exec Plugin Producing a Token (HTTPS)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [vale] reported by reviewdog 🐶
[StyleRules.Headings] 'Scenario 1: Bearer Token or Exec Plugin Producing a Token (HTTPS)' should use sentence-style capitalization.




## Scenario 2: X.509 Client Certificate or Exec Plugin Producing a Certificate (TLS Passthrough)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [vale] reported by reviewdog 🐶
[StyleRules.Headings] 'Scenario 2: X.509 Client Certificate or Exec Plugin Producing a Certificate (TLS Passthrough)' should use sentence-style capitalization.

certificate-authority-data: <your-existing-cluster-ca-base64> # Keep as-is
```

The `user` section (with `client-certificate-data` and `client-key-data`) stays unchanged — these are passed through to the API server via the TLS handshake.
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [vale] reported by reviewdog 🐶
[StyleRules.EmDash] Don't put a space before or after a dash.


### Kubernetes RBAC remains your primary authorization layer

ngrok handles transport security — the existing Kubernetes RBAC rules still control what any authenticated user can do. Ensure that service accounts and user accounts exposed through the ngrok endpoint follow the principle of least privilege.
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [vale] reported by reviewdog 🐶
[StyleRules.EmDash] Don't put a space before or after a dash.

@sg-writer sg-writer added area/k8s kind/net-new New documentation is being added. docs/content Changes to the written material in the docs labels Mar 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/k8s docs/content Changes to the written material in the docs kind/net-new New documentation is being added.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants