Error Solving : -bash: /usr/local/bin/kubectl: cannot execute binary file : after Kubernetes installation: you're trying to run the kubectl command on an EC2 instance in AWS
you're trying to run the kubectl command on an EC2 instance in AWS, the first thing to check is whether you've downloaded the correct version of kubectl for your instance's operating system and architecture.
follow these steps to resolve it:
You can download the correct version of kubectl using the following commands:
For Linux x86_64:
copy this link and paste it into your terminal and press Enter.
if your system requires arm64 then copy the below link and paste it into the terminal and Enter.
For Linux arm64:
now,
Make sure you have the correct version of kubectl for your system architecture.
Once you have the correct version of kubectl, Enter the following command:
==> chmod +x kubectl
Then, move the
kubectl binary to a directory in your $PATH, such as /usr/local/bin/ by running the following command:==> sudo mv kubectl /usr/local/bin/
After all these steps completion Enter the command: kubectl and press Enter if you get the following screen you have successfully completed.





Comments
Post a Comment