Connect
Kubernetes
The bastion is an API server in front of your cluster. kubectl talks to it with a token; the bastion talks to the cluster with the account's service-account token.
Get a kubeconfig#
In My access, click kubeconfig on the cluster's row (or open Databases, where clusters are listed with the databases). Choose a duration, 1, 8 or 24 hours. The console downloads a kubeconfig:
- the server is
https://bastion.example.com:16443/clusters/alice#deployer@prod-cluster; - the user's token is your connection token;
- the bastion's certificate authority is included when the administrators configured it.
$ export KUBECONFIG=~/Downloads/prod-cluster.kubeconfig
$ kubectl get pods -n web
$ kubectl exec -it deploy/web -n web -- shk9s, Lens and any client that reads a kubeconfig work the same way.
What you may do#
What the account may do in the cluster is the cluster's own RBAC for its service account: the bastion does not widen it. On top of it, command policies can refuse requests such as delete deployments.apps/web -n prod, and a shell command typed in a pod, such as rm -rf, as they refuse it over SSH.
What is recorded#
Each request (get pods -n web, delete deployments.apps/web -n prod) is recorded, and exec and attach streams are recorded like a terminal and replay in Audit → Sessions. Revoke the token in Databases when you are done.