kubectl Not Installed or Configured When Analyzing Container Processes
Symptom
Real-time profiling or sampling profiling of container processes fails, and a message is displayed indicating that kubectl is not installed or configured in the target environment.
Possible Causes
- kubectl is not installed in the target environment.
- kubectl has been installed in the target environment, but the permission has not been configured.
- The management node of the Kubernetes cluster is faulty.
Troubleshooting Procedure
If kubectl has been installed but the permission has not been configured, perform the following operations:
- Create a file directory.
1mkdir -p $HOME/.kube
- Copy the management node configuration file to the compute node.
1sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
Do not allocate a permission to compute nodes in the production environment because this operation will cause security risks.
- Assign a permission on the configuration file.
1sudo chmod -R 777 $HOME/.kube/config
Parent topic: FAQs