It looks like Docker Desktop for Mac is using a 1.22+ version of Kubernetes which introduces a number of breaking changes specifically to the ingress-nginx controller apiVersion. This is causing issues with our local development cluster.
There are couple options:
- Rolling back the Kubernetes version to something
<1.22in the development cluster. - Updating
ingress-nginxand the development configuration to use>=1.22.
I'm trying to go with route 1. and downgrade the version to match our production cluster: v1.20.7 primarily because 1.22+ isn't available in Azure yet it looks like. It makes sense to me to have the development and production versions match.
That is my question: How do you change the version of Kuberentes that `docker-desktop uses?
If that can't be done, then I guess I'll just have to go with 2.
What've tried so far is simply following the kubectl documentation:
curl -LO "https://dl.k8s.io/release/v1.20.7/bin/darwin/arm64/kubectl"
chmod +x ./kubectl
sudo mv ./kubectl /usr/local/bin/kubectl
kubectl version --client
Client Version: version.Info{Major:"1", Minor:"23", GitVersion:"v1.23.0", GitCommit:"ab69524f795c42094a6630298ff53f3c3ebab7f4", GitTreeState:"clean", BuildDate:"2021-12-07T18:08:39Z", GoVersion:"go1.17.3", Compiler:"gc", Platform:"darwin/arm64"}
Skeptical it was going to work and sure enough it doesn't.
Edit:
Option 3.: use something like minikube, mikrok8s, k3d, etc.
It is looking like the only way to downgrade change the kubectl version is to downgrade Docker Desktop for Mac.