kubectl
commands (with downloaded, valid kubeconfig) see errors like:error: You must be logged in to the server (Unauthorized)
Error: pinniped-auth login failed: exit status 1
Error: exit status 1
Error: could not complete concierge credential exchange: could not login: the server could not find the requested resource
kubectl
commands. Kube-api server pods are running."Unable to authenticate the request" err="[invalid bearer token, service account token is not valid yet]"
timedatectl
command from SSH to workload cluster nodes directly, the Local time is more than 2 minutes different than the RTC time, for example:# timedatectl
Local time: Wed 2024-05-15 10:30:00 UTC
Universal time: Wed 2024-05-15 10:30:00 UTC
RTC time: Wed 2024-05-15 10:36:00 UTC
Time zone: UTC (UTC, +0000)
System clock synchronized: no
NTP service: active
RTC in local TZ: no
The authentication failures occur because the server from which users attempt to login is greater than 2 minutes in time ahead of the workload cluster node's local time. The token issued by Dex defaults to a 2 minute expiry, leading to a failure in authentication. If the source and destination server's times are greater than 2 minutes apart, the token can never be validated.