error: You must be logged in to the server - the server has asked for the client to provide credentials - “kubectl logs” command gives error

后端 未结 4 1214
小蘑菇
小蘑菇 2021-02-15 02:11

We had setup kubernetes 1.10.1 on CoreOS with three nodes. Setup is successfull

NAME                STATUS    ROLES     AGE       VERSION
node1.example.com   Rea         


        
4条回答
  •  长情又很酷
    2021-02-15 02:32

    In general, many different .kube/config file errors will trigger this error message. In my case it was that I simply specified the wrong cluster name in my config file (and spent MANY hours trying to debug it).

    When I specified the wrong cluster name, I received 2 requests for MFA token codes, followed by the error: You must be logged in to the server (the server has asked for the client to provide credentials) message.

    Example:

    # kubectl create -f scripts/aws-auth-cm.yaml
    Assume Role MFA token code: 123456
    Assume Role MFA token code: 123456
    could not get token: AccessDenied: MultiFactorAuthentication failed with invalid MFA one time pass code.
    

提交回复
热议问题