Skip to content

K8s

Access enrolled Kubernetes clusters from a beam through Teleport.

Build with agents
On this page

Use kubectl in a beam to reach a Kubernetes cluster enrolled in Teleport. Kubernetes traffic does not use the beam’s virtual network (VNet).

Connect through a local proxy

A Teleport agent running the Kubernetes Service dials out to your Teleport cluster. The service forwards requests to the Kubernetes API. The beam doesn’t need a direct network route to the API.

Inside the beam, use tsh kube ls to list authorized clusters. To run kubectl, use tsh proxy kube to start a local proxy and supply a temporary kubeconfig. Teleport uses the beam’s delegated roles, and Kubernetes applies its own RBAC. You don’t need tsh kube login or a copy of your workstation’s kubeconfig.

Kubernetes access from a beam

The Teleport agent dials out. In the beam, kubectl connects through a local tsh proxy, not VNet.

The Teleport agent initiates the outbound tunnel via Teleport. Inside the Beams runtime, kubectl uses the local tsh proxy, which sends requests through Teleport to the agent. The agent forwards them to the Kubernetes API.

Beams runtime kubectl + local tsh proxy
Outbound tunnel
via Teleport
Kubernetes requests
via Teleport
Target cluster
Teleport agent Kubernetes Service
Kubernetes API

Get started

Search docs

Loading search and AI…

Skills

Install all available skills. All Beams and Teleport skills are hosted in our OSS Teleport repository.

npx skills add https://github.com/gravitational/teleport