.nh .TH "glab" "1" "Sep 2026" "Auto generated by spf13/cobra" "" .SH NAME glab-cluster-agent-get-token - Create a personal access token for a GitLab Agent for Kubernetes. .SH SYNOPSIS \fBglab cluster agent get-token [flags]\fP .SH DESCRIPTION The token has the \fBk8s_proxy\fR scope and is valid until the end of the current day. .PP You might receive an email from your GitLab instance that a new personal access token has been created. .SH OPTIONS \fB-a\fP, \fB--agent\fP=0 The numerical Agent ID to connect to. .PP \fB-c\fP, \fB--cache-mode\fP="force-keyring" Mode to use for caching the token. Allowed values: keyring-filesystem-fallback, force-keyring, force-filesystem, no. .PP \fB--check-revoked\fP[=false] Check if a cached token is revoked. This requires an API call to GitLab which adds latency every time a cached token is accessed. .PP \fB--jq\fP="" Filter JSON output with a jq expression. .PP \fB--token-expiry-duration\fP=24h0m0s Duration for how long the generated tokens should be valid for. Minimum is 1 day and the effective expiry is always at the end of the day, the time is ignored. .SH OPTIONS INHERITED FROM PARENT COMMANDS \fB-h\fP, \fB--help\fP[=false] Show help for this command. .PP \fB-R\fP, \fB--repo\fP="" Select another repository. You can use either OWNER/REPO or GROUP/NAMESPACE/REPO. The full URL or Git URL is also accepted. .SH EXAMPLE .EX # Get a token for agent 123 glab cluster agent get-token --agent 123 .EE .SH SEE ALSO \fBglab-cluster-agent(1)\fP