Deploy to kubernetes kind fails with `unable to recognize "STDIN"`

Hi,

i try to get garden running with my local kubernetes kind. however it just fails with the following message on the first deploy:

     ✔ providers                 → Getting status... → Cached
      ℹ Run with --force-refresh to force a refresh of provider statuses.
      Scanning project root at /usr/local/Cellar/garden-cli/0.12.39/libexec/static/kubernetes/system
→ Includes: **/*garden.y*ml
→ Excludes: ../../../../../../../../..~/<...>/lok8l/garden_io/.garden/kubernetes.garden/**/*,.git,.gitmodules,.garden/**/*,debug-info*/**
         Found 9 files in project root /usr/local/Cellar/garden-cli/0.12.39/libexec/static/kubernetes/system
Kubernetes: Getting API resource info for group rbac.authorization.k8s.io/v1beta1
   Syncing 0 files from nginx-kind to ../../../../../../../../..~/<...>/lok8l/garden_io/.garden/kubernetes.garden/build/nginx-kind (and removing any extraneous files)
Kubernetes: Getting API resource info for group rbac.authorization.k8s.io/v1beta1
Kubernetes: Getting API resource info for group rbac.authorization.k8s.io/v1beta1
Kubernetes: Getting API resource info for group rbac.authorization.k8s.io/v1beta1
Updating annotations and labels on namespace garden-system
Kubernetes: Getting API resource info for group rbac.authorization.k8s.io/v1beta1
Kubernetes: Getting API resource info for group rbac.authorization.k8s.io/v1beta1
All resources missing from cluster
   ℹ nginx-kind                → Deploying version v-1fb9da8c59...
      Updating annotations and labels on namespace garden-system
      Kubernetes: Getting API resource info for group rbac.authorization.k8s.io/v1beta1
      Kubernetes: Getting API resource info for group rbac.authorization.k8s.io/v1beta1
      ℹ nginx-kind                → Waiting for resources to be ready...
      Status of Namespace ingress-nginx is "ready"
      ℹ nginx-kind                → Resources ready
   ✖ nginx-kind                → Deploying version v-1fb9da8c59...

Failed deploying service 'nginx-kind' (from module 'nginx-kind'). Here is the output:
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Command "~/.garden/tools/kubectl/c03ac1287fd280ad/kubectl --context=kind-kind apply --output=json -f -" failed with code 1:

unable to recognize "STDIN": no matches for kind "ClusterRole" in version "rbac.authorization.k8s.io/v1beta1"
unable to recognize "STDIN": no matches for kind "Role" in version "rbac.authorization.k8s.io/v1beta1"
unable to recognize "STDIN": no matches for kind "RoleBinding" in version "rbac.authorization.k8s.io/v1beta1"
unable to recognize "STDIN": no matches for kind "ClusterRoleBinding" in version "rbac.authorization.k8s.io/v1beta1"

unable to recognize "STDIN": no matches for kind "ClusterRole" in version "rbac.authorization.k8s.io/v1beta1"
unable to recognize "STDIN": no matches for kind "Role" in version "rbac.authorization.k8s.io/v1beta1"
unable to recognize "STDIN": no matches for kind "RoleBinding" in version "rbac.authorization.k8s.io/v1beta1"
unable to recognize "STDIN": no matches for kind "ClusterRoleBinding" in version "rbac.authorization.k8s.io/v1beta1"
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Can’t get around this, i’ve already tried to disable ingress on my provider config:

providers:
  - name: local-kubernetes
    environments:
      - local
    context: kind-kind
    setupIngressController: null

Can’t find any additional resources to find help :-\

So, any help would be appreciated :wink:

Running with minikube worked but as part of our CI/CD setup i would like to use kind instead of spawning additional VMs.

Bye
Alex

~/lok8l/garden_io/ develop* kind version                                                                                                                                                                           k8s: kind-kind [@default]
kind v0.12.0 go1.17.8 darwin/amd64
~/lok8l/garden_io/ develop* garden version                                                                                                                                                                         k8s: kind-kind [@default]
0.12.39

Hello @la3mmchen ,

sorry for the late reply. I investigated your report and it is true that the kind ingress controller deployed with Garden is out of date. I have created a PR to update it, so it works with the latest Kubernetes versions.

You can track the PR here: fix: update nginx ingress controller for kind by twelvemo · Pull Request #2902 · garden-io/garden · GitHub

Setting setupIngressController to null in the meantime is a great idea. Garden will not install the NGINX ingress controller when run, however it will also not remove an existing ingress controller installed by Garden. So to get rid of it, please uninstall it manually with helm or reset your kind cluster.

Hope this helps!

Best,

Anna