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 a jq expression. ✨
  • --token-expiry-duration=24h0m0s β€” duration for how long the generated tokens should be valid for. The minimum is 1 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 either OWNER/REPO or GROUP/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 🌈

glab-cluster-agent(1)


🫢 That’s the page, bestie! It’s Auto generated by spf13/cobra, dated Nov 2026, and it belongs to the glab(1) manual. Slay and stay hydrated. πŸ’–
πŸ“¦ where this page comes from