glab(1)
π glab(1) β GitLab CLI, bestie edition π
πΈ NAME πΈ
glab-cluster-agent-get-token β create a personal access token for a GitLab Agent for Kubernetes. π
β¨ SYNOPSIS β¨
glab cluster agent get-token [flags]
π¦ DESCRIPTION π¦
Okay so this token has the k8s_proxy scope, and itβs valid until the end of the current day. Yes, bestie, it expires at dayβs end β plan accordingly. β³
Also, plot twist: you might receive an email from your GitLab instance that a new personal access token has been created. π
π OPTIONS π
-a,--agent=0β the numerical Agent ID to connect to. π―-c,--cache-mode="force-keyring"β the mode to use for caching the token. Allowed values:keyring-filesystem-fallback,force-keyring,force-filesystem,no.--check-revoked[=false]β check if a cached token is revoked. Heads up: this requires an API call to GitLab, which adds latency every time a cached token is accessed.--jq=""β filter JSON output with ajqexpression. β¨--token-expiry-duration=24h0m0sβ duration for how long the generated tokens should be valid for. The minimum is1 day, and the effective expiry is always at the end of the day β the time is ignored.
π OPTIONS INHERITED FROM PARENT COMMANDS π
-h,--help[=false]β show help for this command. π«Ά-R,--repo=""β select another repository. You can use eitherOWNER/REPOorGROUP/NAMESPACE/REPO. The full URL or Git URL is also accepted.
π EXAMPLE π
# Get a token for agent 123
glab cluster agent get-token --agent 123
π SEE ALSO π
π«Ά Thatβs the page, bestie! Itβs Auto generated byspf13/cobra, dated Nov 2026, and it belongs to theglab(1)manual. Slay and stay hydrated. π
π¦ where this page comes from
- arch rolling: glab 1.128.0-1 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms