Consul error connect injector when the Gateway API already installed, conflite of versions Gateway API CRD.
- Dominant language
- Go
- Stars
- 30.1k
- Forks
- 4.6k
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 39
Description
#### Overview of the Issue
I've already gateway API installed on my cluster EKS with the CRD version v1. When I try to install the consul service mesh the error occurs in the connector injector pod:
ERROR setup unable to register field indexes {"error": "failed to get API group resources: unable to retrieve the complete list of server APIs: gateway.networking.k8s.io/v1alpha2: the server could not find the requested resource"}
---
#### Reproduction Steps
Steps to reproduce this issue, eg:
1. You need to have a cluster running.
2. Install the gateway API CRD's v1
3. Try to install the consul service mesh v1.22.5
4. Check the logs of pod connector-injector
### Operating system and Environment details
I've been using EKS 1.34.
### Log Fragments
2026-03-10T19:42:15.658Z [INFO] consul-server-connection-manager.consul-server-connection-manager: trying to connect to a Consul server
2026-03-10T19:42:15.855Z [INFO] consul-server-connection-manager.consul-server-connection-manager: discovered Consul servers: addresses=[10.235.96.131:8502, 10.235.98.62:8502, 10.235.97.123:8502]
2026-03-10T19:42:15.855Z [INFO] consul-server-connection-manager.consul-server-connection-manager: current prioritized list of known Consul servers: addresses=[10.235.96.131:8502, 10.235.98.62:8502, 10.235.97.123:8502]
2026-03-10T19:42:15.862Z [INFO] consul-server-connection-manager.consul-server-connection-manager: connected to Consul server: address=10.235.96.131:8502
2026-03-10T19:42:15.863Z INFO setup Config file present and deserialized {"file": "/consul/config/config.json", "config": {"image_pull_secrets":[]}}
2026-03-10T19:42:15.954Z [INFO] consul-server-connection-manager.consul-server-connection-manager: updated known Consul servers from watch stream: addresses=[10.235.98.62:8502, 10.235.97.123:8502, 10.235.96.131:8502]
2026-03-10T19:42:15.961Z ERROR setup unable to register field indexes {"error": "failed to get API group resources: unable to retrieve the complete list of server APIs: gateway.networking.k8s.io/v1alpha2: the server could not find the requested resource"}
github.com/hashicorp/consul-k8s/control-plane/subcommand/inject-connect.(*Command).configureControllers
/home/runner/work/consul-k8s/consul-k8s/control-plane/subcommand/inject-connect/v1controllers.go:110
github.com/hashicorp/consul-k8s/control-plane/subcommand/inject-connect.(*Command).Run
/home/runner/work/consul-k8s/consul-k8s/control-plane/subcommand/inject-connect/command.go:430
github.com/mitchellh/cli.(*CLI).Run
/home/runner/go/pkg/mod/github.com/mitchellh/cli@v1.1.5/cli.go:262
main.main
/home/runner/work/consul-k8s/consul-k8s/control-plane/main.go:21
runtime.main
/opt/hostedtoolcache/go/1.25.7/x64/src/runtime/proc.go:285
2026-03-10T19:42:15.961Z ERROR setup could not configure controllers: failed to get API group resources: unable to retrieve the complete list of server APIs: gateway.networking.k8s.io/v1alpha2: the server could not find the requested resource {"error": "failed to get API group resources: unable to retrieve the complete list of server APIs: gateway.networking.k8s.io/v1alpha2: the server could not find the requested resource"}
github.com/hashicorp/consul-k8s/control-plane/subcommand/inject-connect.(*Command).Run
/home/runner/work/consul-k8s/consul-k8s/control-plane/subcommand/inject-connect/command.go:432
github.com/mitchellh/cli.(*CLI).Run
/home/runner/go/pkg/mod/github.com/mitchellh/cli@v1.1.5/cli.go:262
main.main
/home/runner/work/consul-k8s/consul-k8s/control-plane/main.go:21
runtime.main
/opt/hostedtoolcache/go/1.25.7/x64/src/runtime/proc.go:285
2026-03-10T19:42:15.961Z [INFO] consul-server-connection-manager.consul-server-connection-manager: stopping
Contributor guide
Research direction
Start in control-plane/subcommand/inject-connect/v1controllers.go at configureControllers, then read command.go around the reported Run call. Reproduce on EKS with Gateway API CRDs at v1 and Consul service mesh v1.22.5; done means connector-injector configures its controllers without the missing gateway.networking.k8s.io/v1alpha2 error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, go, kubernetes
- Domain
- api, infrastructure
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100