Teleport gives you a unified control plane for Kubernetes access across every cluster in your environment — whether on-premises, in the cloud, or at the edge. Instead of distributing kubeconfig files with long-lived credentials, users authenticate once withDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/gravitational/teleport/llms.txt
Use this file to discover all available pages before exploring further.
tsh and request access to any registered cluster. The Teleport Kubernetes Service intercepts all kubectl traffic, enforces role-based access controls, and streams session activity to the audit log.
How the Teleport Kubernetes Service works
The Teleport Kubernetes Service runs as a pod (or a standalone process) and maintains a reverse tunnel to the Teleport Proxy Service. When a user runs akubectl command, the traffic flows:
- Validates the user’s short-lived Teleport certificate.
- Checks the user’s Teleport roles for
kubernetes_labels,kubernetes_groups, andkubernetes_resourcespermissions. - Impersonates the appropriate Kubernetes user and groups using the Kubernetes API server’s built-in impersonation headers.
- Records the session and emits audit events.
Prerequisites
- A running Teleport cluster (cloud or self-hosted). See Deploy a Cluster.
- Helm 3 installed on your workstation.
kubectlconfigured with admin access to the Kubernetes cluster you want to enroll.tctlauthenticated to your Teleport cluster.
Enrolling a Kubernetes cluster
Create a Teleport role for Kubernetes access
Teleport users need a role that grants access to Kubernetes clusters. The following role grants access to all clusters and maps the user to the Apply the role and assign it to your Teleport user:
viewers Kubernetes group:Create Kubernetes RBAC bindings
The
viewers Kubernetes group doesn’t have permissions inside the cluster yet. Create a ClusterRoleBinding to bind the viewers group to the built-in view role:Deploy the Teleport Kubernetes Service
The fastest way to enroll a cluster is to deploy the Then install the chart:Verify the agent pod is running:
teleport-kube-agent Helm chart directly onto the cluster you want to protect. Generate a join token first:You can also deploy the Kubernetes Service on a dedicated VM outside the cluster and point it at a kubeconfig. See the Static kubeconfig registration guide for details.
Kubernetes RBAC and impersonation
Teleport translates its own role system into Kubernetes RBAC via impersonation headers. The key fields in a Teleport role are:| Field | Purpose |
|---|---|
kubernetes_labels | Which clusters the user can access, by label |
kubernetes_groups | Kubernetes groups to impersonate on each request |
kubernetes_users | Kubernetes user to impersonate (defaults to the Teleport username) |
kubernetes_resources | Fine-grained resource/verb restrictions (pods, namespaces, etc.) |
development namespace only:
Recording kubectl sessions
Allkubectl exec and kubectl port-forward sessions are recorded and available for playback in the Teleport Web UI under Audit → Session Recordings. The audit log also captures every API call made through the Kubernetes Service.
Next steps
Access Controls & RBAC
Build fine-grained Teleport roles that map to Kubernetes groups and namespaces.
Access Requests
Require just-in-time approval before granting elevated Kubernetes access.
Helm Deployment Reference
All available values for the teleport-kube-agent Helm chart.
Deployment Architecture
Understand how the Proxy, Auth, and agent services interact at scale.
