PowerFlex:kubectl:コマンドが見つかりません

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」がそれらを所有している必要があります。PFMPクラスターがrootアカウントで導入されている場合、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.