VxRail:kubectl 命令返回:您必须登录到未经授权的服务器

Summary: VxRail Manager kubectl 命令返回:由于 kubeconfig 数据不正确,您必须登录到服务器(未经授权)。

This article applies to This article does not apply to This article is not tied to any specific product. Not all product versions are identified in this article.

Symptoms

在 VxRail Manager 上运行任何 kubectl 命令时,会看到以下输出:

error: You must be logged in to the server (Unauthorized)

“permission denied”错误发生:您必须登录到服务器(未经授权)
从 rke2 YAML 文件加载 kubeconfig 时,不会看到这种情况:/etc/rancher/rke2/rke2.yaml

kubectl --kubeconfig /etc/rancher/rke2/rke2.yaml -n helium get nodes

kubectl --kubeconfig /etc/rancher/rke2/rke2.yaml -n helium get nodes
 

在脚本dell_node_replacement.py中运行“remove node”选项时,也会出现此错误:

Failed to clean redis!\error: You must be logged in to the server (Unauthorized)
error: pod, type/name or --filename must be specified 

Cause

RKE2 服务已运行 1 年多 $HOME/.kube/config 已过期。

Resolution

如果您遇到此问题,请联系 戴尔支持 以获得帮助,并提供此知识库文章以供参考。 

Affected Products

VxRail Appliance Family, VxRail Appliance Series
Article Properties
Article Number: 000212809
Article Type: Solution
Last Modified: 08 Apr 2025
Version:  6
Find answers to your questions from other Dell users
Support Services
Check if your device is covered by Support Services.