reliant-labs/forge/cluster-access
Claude Code and agent skill by reliant-labs/forge
- community
Checking that the SKILL.md file is still in the repository.
Reaching another cluster's API server from a workload — forge.KubeconfigSecret, the two credential models (mint a ServiceAccount vs reuse your own), address modes, and rotation on shared clusters.
Install
npx vskill@latest install reliant-labs/forge/cluster-accessSKILL.md
Reaching another cluster's API server
A workload that talks to a Kubernetes API server — a Flux controller, an operator, a proxy — needs a kubeconfig in a Secret. forge.KubeconfigSecret mints one on every deploy, so nothing stale is ever committed.
There are two credential models, and picking the wrong one produces a kubeconfig that renders fine and cannot authenticate.
Copying (the default). With no service_account, forge copies the credential from the target's own kubeconfig. That works for k3d, whose kubeconfig carries a client certificate usable from anywhere:
Minting (any cluster, including GKE). A managed cluster's kubeconfig authenticates with an exec plugin — "run gke-gcloud-auth-plugin using the operator's credentials." Copy that into a Secret and the pod holding it has no plugin binary and no credentials, so it cannot authenticate at all. Declare service_account and forge mints a credential instead: a ServiceAccount, the rules you declare, and a long-lived token, all created on the TARGET cluster, projected into a kubeconfig whose only credential is that token, inline.
reachability says where the READER sits, which is what picks the kubeconfig's server:
| value | the reader is | server | |
|---|---|---|---|
in-network (default) | a pod on the shared docker network | the k3d container by name, verified against the cluster CA | |
endpoint | outside the target | the target's own advertised endpoint | |
in-cluster | a pod INSIDE the target | https://kubernetes.default.svc |
in-cluster requires service_account: a pod cannot present the operator's credential whatever the address.
Limit a rule to named objects with resource_names (rendered as resourceNames):
Kubernetes cannot restrict list, watch, create or deletecollection by name, so do not rely on resource_names to bound those.
Scope the grant with namespaces on the ServiceAccount — the rules become a Role in each listed namespace instead of a cluster-wide ClusterRole. Prefer that whenever the consumer's reach is known.
Three things worth knowing before you rely on it:
- Rotation. The token is long-lived (a
kubernetes.io/service-account-token
Secret, not a TokenRequest), so it never expires between deploys. To rotate, delete the token Secret on the target and deploy. A bounded TokenRequest would tie validity to deploy cadence, so an env nobody deploys for a month would stop working — bound the credential with rules instead.
- Shared clusters. Everything forge creates is labelled
app.kubernetes.io/managed-by: forge, and forge REFUSES to adopt an existing object without it rather than rewrite someone else's permissions.
- Review before granting.
forge env deploy --dry-runprints every
object the mint would create, on which cluster, without contacting one.
Not this: letting the CONTROL PLANE deploy into your cluster
This skill is about a workload of yours reaching a cluster's API server. If what you want is for the hosted control plane to deploy INTO a cluster you operate, that is forge cluster connect — a different mechanism with a different credential model (GKE workload identity, or a scoped ServiceAccount token forge mints), and it needs no KubeconfigSecret at all.
Load deploy/cluster-connect.
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckinginternal/templates/project/skills/forge/deploy/cluster-access/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/reliant-labs/forge/cluster-access)