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.
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.
via Teleport
via Teleport
Get started
- Enroll a Kubernetes cluster: Enroll one cluster and list pods from a beam with read-only access.
- Teleport Auto-Discovery: Find enrollment options for other Kubernetes deployments.