Skip to content

HIGH k8s & GKE is version 1.36.0 which is not supported by k8s-client java #4809

Closed

Description

@naresh-naga

Describe the bug
As per the versioning support for this library is upto 1.35. But GKE and K8s release version 1.36. Because of that we are unable to run the spring boot application in 1.35 GKE/K8S. Getting below error.

j.l.IllegalArgumentException: The field `allocatedResources` in the JSON string is not defined in the `V1PodStatus` properties.

https://github.com/kubernetes-client/java/wiki/2.-Versioning-and-Compatibility

Client Version
e.g. [26.0.1](https://github.com/kubernetes-client/java/tree/v26.0.1)

Kubernetes Version
e.g. 1.36.0

Java Version
e.g. Java 21

To Reproduce
Use latest version of kubernetes java client and deploy apps

Expected behavior
Should pods start successfully.

KubeConfig
None
Server (please complete the following information):

  • OS: [e.g. Linux]
  • Environment Docker
  • Cloud GKE

Additional context
Add any other context about the problem here.

Activity

  1. priyanshuvishwakarma273403 commented on Jun 21, 2026

    @priyanshuvishwakarma273403

    hi @maintainer could you please this issue assigned toh me??
    thank you

  2. rking-bennie commented on Jun 25, 2026

    @rking-bennie

    I hope this is fixed soon.

  3. brendandburns commented on Jun 28, 2026

    @brendandburns
    Contributor

    In progress in #4840

  4. brendandburns commented on Jun 28, 2026

    @brendandburns
    Contributor

    fwiw, while we are regenerating for 1.36, I'm curious about where/how you are seeing this error, because as far as I know the library should be resilient to unknown fields. Can you send the complete stack trace you are seeing.

  5. rking-bennie commented on Jun 30, 2026

    @rking-bennie

    fwiw, while we are regenerating for 1.36, I'm curious about where/how you are seeing this error, because as far as I know the library should be resilient to unknown fields. Can you send the complete stack trace you are seeing.

    Hi @brendandburns we didn't put the rest of the exception because it is just specific details to our GKE cluster/application.

    The exception froms from org.springframework.cloud.kubernetes.client.KubernetesClientHealthIndicator with the message Health check failed. Since the exception contains the V1PodStatus object, the string is clipped to the first 2000 characters are so which is the json string for the pod in GKE.

    I was personally surprised myself that this is not tolerantly read.

  6. rking-bennie commented on Jun 30, 2026

    @rking-bennie

    @brendandburns this seems similar to the issue here: #3428 (comment)

    What's even more interesting is, looking the the PR #4842 "allocatedResources" is defined even in the old V1PodStatus. There's some problem where using a new GKE version than this client is built with will always cause issues it seems. I'm not sure what the root issue is.

  7. brendandburns commented on Jul 1, 2026

    @brendandburns
    Contributor

    Thanks for the details, yeah, it looks like the new code generator isn't tolerant of unknown fields, I will see if there is a configuration setting which would allow it to be tolerant of unknown fields. Without that, I agree that there will be breaking changes like this that require version alignment.

  8. brendandburns commented on Jul 1, 2026

    @brendandburns
    Contributor

    I just pushed release 27.0.0 to sonatype, assuming things are working correctly, it should be visible in maven central in ~24h, but we've seen some issues (eg #4811) so I will check back in tomorrow and manually publish if it didn't work.

  9. VasuHarness commented on Nov 17, 2026

    @VasuHarness

    is this issue is there for the java client is 22.5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions