Member-only story
Resolving the “sudo: kubeadm-token: command not found” Error in Kubernetes
Introduction
If you encounter the error sudo: kubeadm-token: command not found
when running sudo kubeadm-token create --print-join-command
, it indicates that the kubeadm-token
command is not available on your system. This issue typically arises due to one of the following reasons:
- Incorrect Command: The correct command is
kubeadm token
, notkubeadm-token
. The correct usage issudo kubeadm token create --print-join-command
. - Kubeadm Not Installed: The
kubeadm
tool might not be installed on your system.
Here’s a step-by-step guide to resolve this issue:
Step 1: Verify Kubeadm Installation
First, ensure that kubeadm
is installed on your system. You can check this by running:
kubeadm version
If you get a version output, kubeadm
is installed. If not, you'll need to install it.
Step 2: Install Kubeadm
If kubeadm
is not installed, follow these steps to install it:
- Update Package Index:
sudo apt-get update
- Install Kubeadm:
sudo apt-get install -y kubeadm