diff --git a/pkg/clients/gke/gke.go b/pkg/clients/gke/gke.go index 4feac7d..0665cc7 100644 --- a/pkg/clients/gke/gke.go +++ b/pkg/clients/gke/gke.go @@ -52,6 +52,9 @@ func WrapRESTConfig(ctx context.Context, rc *rest.Config, credentials []byte, sc t := oauth2.Token{ AccessToken: string(credentials), } + if ok := t.Valid(); !ok { + return errors.New("Access token invalid") + } ts = oauth2.StaticTokenSource(&t) } } else {