禁止空用户“”kuberntes

禁止空用户“”kuberntes

这是命令

kubectl --namespace=somenamespace   exec -it test sh
Error from server (Forbidden): pods "test" is forbidden: User "" cannot create resource 

这是我的 kube 配置

  user:
    exec:
      apiVersion: client.authentication.k8s.io/v1alpha1
      env:
      - name: AWS_PROFILE
        value: "test" # refers to aws profile test located in ~/.aws/config,
      command: aws-iam-authenticator
      args:
      - "token"
      - "-i"
      - "qa"

aws 配置是

[profile test]
role_arn = arn:aws:iam::66776776:role/AssumeRoleReadOnly
source_profile = sso
region = us-east-1

我不明白为什么用户为空“”并且我收到禁止错误

相关内容