# K8s

Access enrolled Kubernetes clusters from a beam through Teleport.

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.

<!-- illustration
id: beam-kubernetes-connectivity
style: docs-isometric
type: static
title: Kubernetes access from a beam
description: The Teleport agent dials out. In the beam, kubectl connects through a local tsh proxy, not VNet.

Show kubectl using the local tsh proxy in the Beams runtime. Group the Teleport agent (Kubernetes Service) and the Kubernetes API in the target cluster. A dashed arrow points from the agent toward the runtime and is labelled “Outbound tunnel via Teleport”. A solid arrow points from the runtime toward the agent and is labelled “Kubernetes requests via Teleport”; a second solid arrow points from the agent to the Kubernetes API. The arrows show who initiates each connection, not two physical transports. Do not draw VNet or a direct connection from kubectl to the Kubernetes API. Keep both directions legible on mobile.
-->

## Get started

- [Enroll a Kubernetes cluster](/docs/guides/kubernetes/): Enroll one cluster and list pods from a beam with read-only access.
- [Teleport Auto-Discovery](https://goteleport.com/docs/enroll-resources/auto-discovery/): Find enrollment options for other Kubernetes deployments.
