containers-roadmap icon indicating copy to clipboard operation
containers-roadmap copied to clipboard

[EKS] [bug]: metrics-server add-on v0.9.0-eksbuild.12 (built with Go 1.27) makes kube-apiserver return 503 for protobuf /openapi/v2

Open maismail opened this issue 1 month ago • 1 comments

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Tell us about your request Publish a fixed build of the EKS managed add-on metrics-server to replace v0.9.0-eksbuild.12, and stop offering .12 as the default version until then.

Which service(s) is this request for? EKS (managed add-on metrics-server)

Tell us about the problem you're trying to solve. What are you trying to do, and why is it hard? Since v0.9.0-eksbuild.12 became the newest and default metrics-server version for Kubernetes 1.34 and 1.35 (image built 2026-10-12), clusters running it can't serve the OpenAPI v2 schema as protobuf. JSON still works:

Accept: application/json                                          -> 200
Accept: application/[email protected]+protobuf -> 503

kube-apiserver logs Error in OpenAPI handler: ... io.k8s.metrics.pkg.apis.metrics.v1beta1.NodeMetrics has invalid properties: ArbitraryKeys, SchemaProps, SwaggerSchemaProps. That's 20 definitions, all from metrics.k8s.io.

Anything that downloads that schema fails with the server is currently unable to handle the request. This includes kubectl and Helm client-side validation (for example kubectl apply --validate=strict of a v1 List, or Helm charts that use a List, such as aws-load-balancer-controller), Argo CD and Pulumi.

To reproduce on a fresh EKS 1.34 cluster:

kubectl apply --dry-run=client --validate=strict -f - <<'YAML'
apiVersion: v1
kind: List
items:
- {apiVersion: v1, kind: ConfigMap, metadata: {name: probe, namespace: default}}
YAML
  1. With the add-on on v0.9.0-eksbuild.11: configmap/probe created (dry run).
  2. After aws eks update-addon --addon-name metrics-server --addon-version v0.9.0-eksbuild.12: within about 30 seconds the same command fails with error validating data: the server is currently unable to handle the request.
  3. Back on .11, it passes again after about a minute.

The cause shows in the build info of the add-on binaries (602401143452.dkr.ecr.<region>.amazonaws.com/eks/metrics-server):

Add-on version Go kube-openapi Result
v0.9.0-eksbuild.10 go1.26.6 v0.0.0-20260520065146-aa012df4f4af OK
v0.9.0-eksbuild.11 go1.26.6 v0.0.0-20260520065146-aa012df4f4af OK
v0.9.0-eksbuild.12 go1.27.2 v0.0.0-20260520065146-aa012df4f4af broken
v0.8.1-eksbuild.21 go1.27.2 v0.0.0-20250910181357-589584f1c912 OK

Go 1.27 turns on the jsonv2 GOEXPERIMENT by default. In kube-openapi aa012df4f4af, that replaces the vendored JSON engine with the standard library's encoding/json/v2, which renamed the inline tag option to embed. So spec.Schema is written out with its Go field names. It's the same source with a different toolchain. Upstream: kubernetes-sigs/metrics-server#1868, fixed in kubernetes/kube-openapi#616 (metrics-server's main branch already has it, but no release does).

Any of these would produce a working build: Go 1.26, GOEXPERIMENT=nojsonv2, or kube-openapi v0.0.0-20260721132016-d427ff9ee9ad or newer.

Are you currently working around this issue? We pin the add-on to v0.9.0-eksbuild.11. EKS accepts the rollback, and it has no side effects since both builds are v0.9.0. Tooling that installs the latest or default add-on version picks up .12 again.

Additional context

  • kubernetes-sigs/metrics-server#1868 also reports this on EKS 1.35 with .12.
  • After rolling back, kube-apiserver keeps serving the broken merged spec until it re-syncs the aggregated spec, about a minute.

maismail avatar Oct 15 '26 15:10 maismail

v0.9.0-eksbuild.13 (go1.27.2, GOEXPERIMENT=nojsonv2) fixes this. Verified on EKS 1.34: protobuf /openapi/v2 returns 200 and the v1 List dry-run passes. Thanks! Note that .12 is still offered by describe-addon-versions.

maismail avatar Oct 16 '26 13:10 maismail