kubectl-错误:您必须登录到服务器 [英] kubectl - error: You must be logged in to the server

查看:97
本文介绍了kubectl-错误:您必须登录到服务器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经配置了OIDC,并使用kubeadm安装了k8s. 配置完成后,当我运行命令kubectl --user=name@gmail.com get nodes时,我会得到

I have configured OIDC with k8s installed using kubeadm. After the configuration, when I run the command kubectl --user=name@gmail.com get nodes I get

错误:您必须登录到服务器(服务器已要求客户端提供凭据(获取节点))

error: You must be logged in to the server (the server has asked for the client to provide credentials (get nodes))

有人可以帮我吗?

推荐答案

我使用kubectl --username=name@gmail.com get nodes,它可以工作.早些时候,我使用参数--user代替了--username.

I use kubectl --username=name@gmail.com get nodes and it works. Earlier I was using the parameter --user instead of --username.

这篇关于kubectl-错误:您必须登录到服务器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆