Homebrew / homebrew-core

🍻 Default formulae for the missing package manager for macOS (or Linux)
https://brew.sh
BSD 2-Clause "Simplified" License
13.69k stars 12.39k forks source link

kubectl should provide all supported versions #150553

Closed gdlx closed 1 year ago

gdlx commented 1 year ago

kubectl is compatible with Kubernetes clusters with 1 minor version difference: https://kubernetes.io/docs/tasks/tools/install-kubectl-linux/#before-you-begin

That means brew should not force using the newest version but should allow installing the latest patch version of each supported minor release, as listed here: https://endoflife.date/kubernetes

Today, brew installs kubectl 1.28 (1.22 is also available 🤷‍♂️) which is compatible with 1.27-1.29 but provides no way to install a kubectl version compatible with 1.25-1.26 clusters that are still supported.

Verification

What were you trying to do (and why)?

Install an older minor version of kubectl (because I'm running clusters in this supported version).

What happened (include all command output)?

I can only download kubectl 1.28, which may be instable with kubernetes 1.25

What did you expect to happen?

Find versioned formulas for supported kubernetes versions (kubectl@1.25, kubectl@1.26, ...)

Step-by-step reproduction instructions (by running brew commands)

brew search kubectl
==> Formulae
kubectl ✔               kubectl@1.28 ✔          kubent                  kubeval                 kumactl
kubectl@1.22            kubectx ✔               kubecm                  kubecfg
SMillerDev commented 1 year ago

This is a feature request so it should be filed as a pull request.