Install and Set Up kubectl with Homebrew on macOS
1. Run the installation command
brew install kubectl
or
brew install kubernetes-cli
2. Test to ensure the version you installed is up-to-date
kubectl version --client
brew install kubectl
or
brew install kubernetes-cli
kubectl version --client