Kubernetes 无法将令牌的json解码:json:无法将数组解组到字符串类型的Go结构字段StandardClaims.aud中

Kubernetes 无法将令牌的json解码:json:无法将数组解组到字符串类型的Go结构字段StandardClaims.aud中,kubernetes,openid,Kubernetes,Openid,我收到了错误信息 error: error: could not get a token from the cache or provider: error while authentication: invalid token and you need to remove the cache: could not decode the json of token: json: cannot unmarshal array into Go struct field StandardClaims.

我收到了错误信息

error: error: could not get a token from the cache or provider: error while authentication: invalid token and you need to remove the cache: could not decode the json of token: json: cannot unmarshal array into Go struct field StandardClaims.aud of type string
在kubectl上访问我的kubernetes群集时,该群集已启用通过OpenID进行身份验证

当我删除本地OpenID令牌时,一切都会再次正常工作,但只有一次。然后返回错误消息

有什么想法吗

致以最良好的祝愿,
rforberger

看起来,无论是谁给你这个令牌,他都会返回一个在“受众”字段中带有数组的令牌,而不是字符串。根据JWTRFC,这是允许的,但是kubectl使用的任何库(听起来像)都不支持它。从技术上讲,这是一个kubectl错误。@BurakSerdar感谢您提供的信息。我应该升级我的jwt go安装还是我的操作系统?我使用的是kubectl 1.16.x。向k8s提交问题可能是最好的解决方案。他们可能已经有了一个解决方法。问题在没有干预的情况下消失了,我不理解。您可能从oidc提供程序获得了一个新的令牌,其中包含aud令牌的字符串值。