PowerFlex: kubectl: command not found
Summary: 权限不正确导致无法从 MVM 运行 kubectl 命令。
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
从 MVM 运行任何 kubectl 命令时,您会收到“permission denied”(权限被拒绝)错误。
Cause
各种配置文件的权限不正确,“delladmin:root”应该拥有它们。如果使用 root 帐户部署 PFMP 群集,则 delladmin 帐户无权运行 kubectl 命令。
Resolution
验证文件及其所有者。
cd /etc ls -lat pki/trust/ rancher/ rancher/rke2/ docker/certs.d/ helmrepo/certs.d
下面的正确所有权
#/etc/rancher/rke2/ -rw------- 1 delladmin root 7534 Dec 14 13:24 rke2.yaml -rw------- 1 delladmin root 365 Dec 7 12:21 rke2-pss.yaml -rw-r--r-- 1 delladmin root 325 Dec 7 12:20 registries.yaml -r-------- 1 delladmin root 1144 Dec 7 12:20 config.yaml #/etc/helmrepo/certs.d/ -rw-r--r-- 1 delladmin root 3243 Dec 7 13:30 client.key -rw-r--r-- 1 delladmin root 2013 Dec 7 13:30 client.crt -rw-r--r-- 1 delladmin root 13999 Dec 7 13:30 ca.crt #/etc/docker/certs.d/ -rw-r--r-- 1 delladmin root 3243 Dec 7 12:58 client.key -rw-r--r-- 1 delladmin root 1980 Dec 7 12:58 client.crt -rw-r--r-- 1 delladmin root 13999 Dec 7 12:58 ca.crt #/etc/rancher drwxr-xr-x 1 delladmin root 96 Dec 14 13:24 rke2 #/etc/pki/trust/ drwxr-xr-x 1 delladmin root 468 Dec 7 12:21 anchors
如果所有权不是 delladmin:root,请使用此行动计划进行更正。
*删除快照完成后,建议在运行以下步骤之前创建每个 MVM 的快照。
在每个 MVM 上运行以下命令:
sudo chown delladmin /etc/pki/trust/anchors sudo chown delladmin /etc/rancher/rke2 sudo chown delladmin /etc/rancher/rke2/* sudo chown delladmin /etc/docker/certs.d/* sudo chown delladmin /etc/helmrepo/certs.d/* # The presence of this file owned by root can cause upgrades to fail with delladmin account rm /tmp/ca.crt
要验证修复,请执行以下作:
kubectl get nodes
在其他 MVM 上重复此作
Article Properties
Article Number: 000292038
Article Type: Solution
Last Modified: 24 Jul 2025
Version: 3
Find answers to your questions from other Dell users
Support Services
Check if your device is covered by Support Services.