-bash: kubeadm: command not found
时间: 2023-09-02 16:06:59 浏览: 148
This error message usually occurs when the kubeadm command is not installed or is not in the system's PATH environment variable. To resolve this issue, you need to install kubeadm or add its location to the PATH variable.
You can install kubeadm on Ubuntu or Debian-based systems by running the following commands:
```
sudo apt-get update && sudo apt-get install -y apt-transport-https curl
curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add -
sudo echo "deb https://apt.kubernetes.io/ kubernetes-xenial main" > /etc/apt/sources.list.d/kubernetes.list
sudo apt-get update
sudo apt-get install -y kubeadm
```
If you have already installed kubeadm, make sure that its location is added to the PATH variable. You can check this by running the following command:
```
echo $PATH
```
If the kubeadm location is not included in the output, you can add it by running the following command:
```
export PATH=$PATH:/path/to/kubeadm
```
Replace "/path/to/kubeadm" with the actual location of the kubeadm binary on your system.
阅读全文