kc logout
Overview
The kc logout command clears your authentication session with Kubauth. It performs two actions: clears local token cache and terminates the SSO session on the Kubauth server.
Syntax
Flags
--issuerURL
The Kubauth OIDC issuer URL.
Example: --issuerURL https://kubauth.example.com
Value may also be fetched from KC_ISSUER_URL environment variable, or Kubernetes kubeconfig if kc init .... has been used.
--insecureSkipVerify
Skip TLS certificate verification. Use only for testing with self-signed certificates.
Example: --insecureSkipVerify
--caFile
Provide a CA file for TLS certificate verification of ìssuerURL
Example: --caFile ./CA.crt
--browser
Override default browser. Possible values:
chromefirefoxsafari
--sso
Only clear the SSO session on Kubauth server. Does not logout of kubectl session, if any
Examples
Output:
No OIDC configuration found in kubeconfig
Opening browser to logout endpoint: https://kubauth.example.com/oauth2/logout
Note
The "No OIDC configuration found" means kubectl has not being configured with kc init ..... Use --sso option to remove the message
Behavior
What It Does
- Clears local cache - Removes cached tokens from the
kubeloginplugin, if installed - Opens browser - Navigates to Kubauth's logout endpoint. This will terminates SSO session by clearing the "Remember me" session cookie
SSO Session vs Local Cache
SSO Session (Server-Side, cross application)
- Stored on Kubauth server
- Managed by "Remember me" checkbox
- Shared across all OIDC clients
- Cleared by
kc logout
Local Cache (Client-Side, for kubectl authentication)
- Need a
kc init ....client configuration - Stored by
kubeloginplugin - Also cleared by
kc logout
Logout Page
After logout, you'll see a page listing available applications:

This page shows OIDC clients with displayName, description, and entryURL configured.
Troubleshooting
TLS Certificate Errors
Error:
Solutions:
- Use
--insecureSkipVerifyfor testing (not recommended for production) - Use
--caFile ./ca.crt. To extract the CA: - Add this CA certificate to system trust store.
Related Commands
kc token- Authenticate and get tokenskc whoami- Check current authenticationkc config- Configure kubectl