- Go to homebrew git repo.
- Identify the commit specific to
kubernetes 1.11.x
(for example) version - Go to Formula folder
- Open raw version of kubernetes-cli.rb file
- Copy the raw link of the file https://raw.githubusercontent.com/Homebrew/homebrew-core/3e8f5503dde7069c5ff49b82d5e1576e6ebe3a5d/Formula/kubernetes-cli.rb
- Run brew install <raw_link>
https://stackoverflow.com/questions/52921122/homebrew-install-specific-version-of-formula
Does this still work? I was able to do it for a cask, but not regular formulae.
The only thing that worked for me was adding my own tap and extract a specific version for it, as stated on this article.
For posterity, for kubernetes version 1.11.2, this means: