Local kubectl with a KeelPilot kubeconfig

Use your own kubectl (or k9s, Lens, Headlamp) against any EKS cluster of a connection, including private clusters that go through the agent. Requests go to KeelPilot, which applies your permissions and the kubectl console policy before forwarding them.

Before you start

  • A Pro or Enterprise plan (the trial includes it). See Plans & limits.
  • Access to the EKS Clusters section in your profile and permission on the AWS connection.
  • kubectl 1.31 or later if you need exec or attach.

Steps

  1. 1Go to Clusters, open the cluster with Gestionar (shown in Spanish) and select the kubectl tab.
  2. 2Choose the Lifetime (1 to 90 days, 30 by default) and click Download kubeconfig. Keep the file like a secret: the token only lives in it.
  3. 3Point kubectl at the downloaded file:
kubectl tab of a cluster in KeelPilot, where the kubeconfig is downloaded
KUBECONFIG=~/Downloads/keelpilot-<connection>-<cluster>.kubeconfig.yaml kubectl get pods -A

The same tab lists your active tokens for that cluster (created, expires, last use) with Revoke, which takes effect immediately.

What applies to your requests

  • The token is personal: tied to your user, organization, connection and cluster. It is never your session, and it stops working when it expires, when you revoke it, or when you lose access to the connection or cluster.
  • Your permissions and the same policy as the kubectl console apply. Confirmation does not: kubectl is already explicit.
  • Secrets: with the default “names only” policy you see name, type, number of keys and age — the same as kubectl get secrets — never values.
  • Writes, exec/attach and blocked requests are recorded in the audit log.

Limitations

  • exec and attach need kubectl ≥ 1.31 (WebSocket). SPDY cannot be forwarded and is rejected with a clear message. kubectl cp uses exec, so it works when exec is allowed.
  • port-forward and proxy are always blocked.
  • kubectl get --raw is not supported: it ignores the URL prefix of the kubeconfig.
  • The policy sees HTTP, not the command: apply, cordon, label and rollout restart arrive as patch/create. If you restrict subcommands, include those.
  • With Secrets on “names only”, kubectl describe secret fails (it asks for the full object).
  • Streams (get -w, logs -f) are cut after 1 hour without data. exec/attach sessions get keepalive pings and are not cut.

Troubleshooting

“Invalid, expired or revoked kubeconfig token”.

Cause: The token expired, was revoked, or you lost access to the connection or cluster.

Fix: Download a new kubeconfig from the kubectl tab.

Your existing kubeconfig stopped working after a plan change (403 “not included in your current plan”).

Cause: The organization moved to Free, which does not include the kubeconfig.

Fix: Upgrade to Pro or Enterprise. You can still list and revoke your tokens meanwhile.

kubectl exec fails saying only WebSocket is supported.

Cause: Your kubectl is older than 1.31 and uses SPDY.

Fix: Upgrade kubectl to 1.31 or later.

kubectl get -w or logs -f ended on its own.

Cause: The stream was idle for an hour, or the tunnel of a private cluster was cut (see Private clusters).

Fix: Run it again; use logs -f --since=1m to avoid losing lines.