Accessing better.care infrastructure with Teleport
This guide is for engineers at better.care who use the internal Teleport
cluster to reach SSH nodes, Kubernetes clusters, databases and web/TCP
apps. This page covers the concepts (clusters, labels) and the daily
tsh cheat-sheet; the task-specific walkthroughs live on sub-pages:
| I want to… | Page |
|---|---|
Install the client and log in for the first time |
|
SSH from the terminal, JetBrains or VS Code; forward ports |
|
Use kubectl / k9s / Helm against every Kubernetes cluster I have access to |
|
Connect to a database (PostgreSQL, MySQL, Oracle, SQL Server) |
|
Open an internal web app or hit an API with curl/Bruno |
|
Do everything from a desktop app instead of a terminal |
1. What is Teleport?
Teleport is the single sign-in front door to better.care’s internal infrastructure. Instead of managing personal SSH keys, kubeconfigs and database credentials, you authenticate once to the Teleport cluster (the fleet of servers Teleport protects, fronted by a proxy) and Teleport issues you a short-lived certificate that grants access to whatever the platform team has authorised.
Key properties:
-
One login (password + 2FA) for SSH, Kubernetes, databases and apps.
-
No long-lived SSH keys on your laptop — certs expire automatically.
-
Every session is audited and recorded.
The proxy is reachable at teleport.better.care:443.
2. How access is organised — clusters and labels
This section is the minimum vocabulary you need so that tsh ls output
makes sense. You don’t have to configure any of this — the platform team
does — but recognising the pieces makes daily navigation much faster.
2.1. Root vs. leaf clusters
You log in to teleport.better.care — that’s the root cluster. Some
sites are run as their own Teleport installations that the root has a
trust relationship with; these are called leaf clusters. If the
platform team has provisioned leaf clusters for you, you’ll see them in
tsh clusters.
Your roles decide which (if any) leaf clusters you can reach. When you do
have access, the same tsh session — and the same Teleport Connect
window — works against the leaf; you just point at the leaf cluster name.
On a leaf cluster, the Linux user you log in as is set by the leaf’s admin (not your own username). Ask the platform team if you’re unsure which login to use.
To list nodes in a leaf cluster from the CLI:
tsh clusters # root + leaf clusters you can reach
tsh ls --cluster=<leaf-cluster> # list nodes in a leaf
tsh ssh <predefined-login>@<node> --cluster=<leaf-cluster>
The GUI equivalent — the cluster picker in Teleport Connect’s top-left corner — is covered in Teleport Connect (GUI).
2.2. Labels
Every node and Kubernetes cluster carries labels — key=value tags
applied by the platform team when the resource is registered. You can’t
set them yourself; you read them to find what you need.
The four labels that matter for navigation at better.care:
| Label | What it means |
|---|---|
|
The access tag, in the form |
|
The organisation or site the node belongs to. Acts as a tenant gate on leaf clusters. |
|
The owning function or team. |
|
The lifecycle stage of the node (typically |
For Azure-discovered nodes the same access label appears prefixed
as azure/teleport_access — same meaning; both keys may be present on
Azure VMs.
|
On databases and apps the same access tag uses dots instead of
colons (tenant.department.environment) — same meaning, different
separator.
|
2.3. Reading labels in tsh ls
tsh ls prints one node per line with its labels in the right-hand
column:
Node Name Address Labels
--------------- ------------- -------------------------------------------------
node-a ⟵ Tunnel env=prod,tenant=<tenant>,department=<dept>,teleport_access=tenantA:dept1:prod
node-b ⟵ Tunnel env=uat,tenant=<tenant>,department=<dept>,teleport_access=tenantA:dept1:uat
You can filter by label with the comma-separated key=value syntax:
tsh ls env=prod,tenant=<your-tenant>
tsh ls teleport_access=<tenant>:<department>:<environment>
tsh ls teleport_access=tenantA:dept1:prod
For richer expressions use the predicate form (covered in [cheat-sheet]):
tsh ls --query='labels["env"] == "prod"'
3. The account you land on
Teleport does not give you a personal Linux account on each server. It logs you in as a shared service account, and it picks the account for you — you never choose it.
On better.care-managed servers that account is better:
tsh ssh better@<node>
On a leaf cluster — a customer-managed estate — the account is whatever that estate’s
admins have predefined, which may not be better. The Web UI and Teleport Connect show
the available login for each server, so you do not have to guess.
To avoid typing the account every time, set export TELEPORT_LOGIN=better in your
shell profile. Without it a bare tsh ssh <node> falls back to your local macOS or
Linux username, which will not exist on the target and the connection will be refused.
|
|
Sharing the account does not make your activity anonymous. Teleport authenticates you,
and the audit log and session recordings are attributed to your own Teleport user — not to
|
4. Daily use: tsh cheat-sheet
| Command | What it does |
|---|---|
|
Acquire a fresh cert. Re-run when it expires. |
|
Show current profile, roles, and cert expiry. |
|
Discard local certs. |
|
List the root cluster plus every leaf cluster you can reach. The
|
|
List reachable SSH nodes in the current cluster, with labels.
Filter: |
|
Same listing, but against a leaf cluster. |
|
Open an SSH session. |
|
List Kubernetes clusters you can reach. |
|
Add a kubeconfig context for that cluster. After this, plain
|
|
Add (or refresh) a kubeconfig context for every cluster you can
reach — run it after |
|
List databases you can reach. |
|
Open a database shell ( |
|
Authenticated local port for GUI clients (DataGrip, DBeaver, …) — no password. See Databases. |
|
List web / TCP applications you can reach, with labels. |
|
Log in to an app and (for web apps) print its public URL. |
|
Open an authenticated local listener for |
|
List your recorded SSH / kube / db / app sessions. |
|
Replay a recorded session. |
5. Troubleshooting
-
"access denied" on
tsh ssh/kubectl/tsh db connect— your cert probably expired. Check withtsh status; refresh withtsh login --proxy=teleport.better.care:443 --user=<username>. -
access to db deniedon a database connect — for PostgreSQL/MySQL,--db-usermust be your own username; see Databases. -
I lost my phone / OTP — contact the platform team; they can run the admin-side reset that lets you re-enrol.
-
JetBrains / VS Code can’t connect — confirm
~/.ssh/confighas theInclude ~/.ssh/teleport_configline and the file exists (re-runtsh config > ~/.ssh/teleport_config), confirmtsh statusshows a valid cert, then runssh -v <node>.<cluster-name>to see whether theProxyCommandis being invoked. More in SSH, IDEs & port forwarding. -
SSH session drops mid-work — your cert TTL elapsed.
tsh loginagain. -
tsh lsshows nothing — either no nodes are tagged with labels your role allows, or you’re pointed at the wrong cluster. Checktsh statusandtsh clusters. -
kubectlcan’t see a cluster Teleport lists — the kubeconfig context hasn’t been generated yet. Runtsh kube login --all; see Kubernetes.
6. Getting help
For access requests, role changes, incidents — and for Oracle / SQL Server database accounts, which are provided by devops / the DB admins — reach out to the platform team via the same channel you’d normally use to request access.
For self-service answers on tsh flags and behaviour, the upstream
docs are at https://goteleport.com/docs.