integrations/operator/README.md
This package implements an operator for Kubernetes. The Teleport Kubernetes Operator allows users to manage Teleport resources through Kubernetes custom resources.
Since v15, the operator now supports running separately from Teleport. This means the operator can be used against any Teleport instance (Teleport Cloud or self-hosted).
For more details, read the corresponding RFD.
See the list of supported resources in the documentation: https://goteleport.com/docs/reference/operator-resources/
Teleport Operator is a Kubernetes (K8s) operator based on the operator-sdk.
The operator joins the Teleport cluster using MachineID. It runs an in-process instance of tbot.
When multiple replicas are running, only the leader reconciles Kubernetes resources.
When the operator starts it:
At point, the operator watches Kubernetes CRs and reconciled them with Teleport.
All the teleport resource changes are made using a gRPC client with certificates provided by tbot.
graph TD
event([event])
eventType{Event type?}
event --> eventType
delete[Delete in Teleport]
eventType -- deletion --> delete
removeFinalizer[Remove finalizer]
delete -- success or 404 --> removeFinalizer
ending([end])
removeFinalizer --> ending
exists{Resource exists\nin Teleport ?}
addFinalizer[Add finalizer]
eventType -- create/update --> addFinalizer
addFinalizer --> exists
ownership{Origin label is\nkubernetes?}
exists -- yes --> ownership
upsert[Upsert in Teleport]
exists -- no --> upsert
ownership -- yes --> upsert
status[Report status on CR]
upsert --> status
status -- success --> ending
fail([retry later])
ownership -- no --> fail
delete -- failure --> fail
status -- failure --> fail
fail -- backoff --> event
If you self-host Teleport using the teleport-cluster Helm chart, you can deploy
the operator by setting the value operator.enable: true. The chart will deploy
the operator and configure Teleport for the operator bot to join.
Please follow the guide in our documentation.
Since v15, the operator can run against a remote Teleport cluster.
Requirements:
kubectl cluster-info must succeed.tsh/tctl logged-in as a user with the editor
role. tctl status must succeed.aws, azure, gcp.kubernetes).TODO(hugoShaka): Link to the user documentation when it will be released.
See CONTRIBUTING.md.