Skip to content

Client needs to be regenerated for Kubernetes 1.33 #4054

Closed

Description

@patroldo

Describe the bug
In kubernetes 1.33 (probably if feature "emulation-version" was enabled), k8s-host/version returns additional fields which breaks JSON-parsing

Client Version
e.g. 23.0.0

Kubernetes Version
e.g. 1.33

Java Version
e.g. Java 17

To Reproduce
Try the following code with server k8s 1.33
"""
CoreV1Api coreV1Api = kubeClientBuilder.getCoreV1Api(kubeConfigFile.toString());

        String kubernetesVersion = new VersionApi(coreV1Api.getApiClient()).getCode().execute().getGitVersion();

"""

Expected behavior
To get version of kubernetes in format "1.33" or something similar

KubeConfig
If applicable, add a KubeConfig file with secrets redacted.

Server (please complete the following information):

  • OS: Linux
  • Environment container
  • Cloud - any platform

Additional context
It looks like in scope of this issue and commit provided below "/version" endpoint response has changed. Basically few additional fields were added:
kubernetes/kubernetes#129969
https://github.com/kubernetes/kubernetes/pull/130019/commits

Error:
An error occurred during validating cluster config: The field emulationMajor in the JSON string is not defined in the VersionInfo properties. JSON:
{"major":"1","minor":"33","emulationMajor":"1","emulationMinor":"33","minCompatibilityMajor":"1","minCompatibilityMinor":"32","gitVersion":"v1.33.0","gitCommit":"65f3ebc02e1db418b0375a4c71c315e12b637b5b","gitTreeState":"clean","buildDate":"2025-05-02T08:36:13Z","goVersion":"go1.24.2","compiler":"gc","platform":"linux/amd64"}

We understand that currently kubernetes java library doesn't support k8s 1.33. Couple of questions:

  1. Could you please help at which version the support of k8s 1.33 is planned
  2. To highlight issue we faced and see if the fix is going to be a part of next release
  3. Is it possible to provide patch-version of library for that specific issue?

Activity

  1. adilGhaffarDev commented on May 20, 2025

    @adilGhaffarDev

    @brendandburns kindly support regarding this issue.

  2. adilGhaffarDev commented on May 20, 2025

    @adilGhaffarDev
  3. brendandburns commented on May 20, 2025

    @brendandburns
    Contributor

    @adilGhaffarDev we haven't regenerated or released the client for Kubernetes 1.33 yet. If you need access to this right now you will need to use the GenericAPI.

    We will regenerate and release the new client soon.

  4. changed the title [-]emulation-version feature changing response of "k8s-host/version" which breaks coreV1Api.getApiClient()[/-] [+]Client needs to be regenerated for Kubernetes 1.33[/+] on May 20, 2025
  5. yue9944882 commented on May 20, 2025

    @yue9944882
    Member

    https://github.com/kubernetes-client/java/actions/runs/15147500693/job/42586643919

    The model regeneration workflow ^^^ was successfully despite that it failed at opening an automated PR at the end, i think it's due to github removed PR-related permissions from the default github token.. Anyway, it's able to push a new branch automated-generate-e5b5abc1 to the repo, so I'm going to manually open a PR from there.. Will also fix the permission issue as follow-up

  6. patroldo commented on May 21, 2025

    @patroldo
    Author

    Hi all

    Thanks for comments and attention to the issue, appreciate it. I checked the branch from pull request and it fixing our issue from code perspective. Couple more questions

    1. @brendandburns - you said new release is soon. By soon you mean upcoming hours, days or weeks? So we can plan properly our activities
    2. If answer are weeks, can we expect a kind of patch version of library? I think it makes sense previous version of library make compatible with emulated version of kubernetes(so like k8s 1.33 which emulates API of k8s 1.32). What you think guys?

    Asking in order to properly plan our activities

  7. brendandburns commented on May 21, 2025

    @brendandburns
    Contributor

    @yue9944882 yeah, that's the way I've been doing it lately unfortunately, it seems like the only way to do it.

    @patroldo it will probably be a week or so. We won't patch the library, we release new versions for each version of Kubernetes, we don't back-port newer API changes into older kubernetes versions.

  8. yue9944882 commented on May 21, 2025

    @yue9944882
    Member
  9. adilGhaffarDev commented on May 21, 2025

    @adilGhaffarDev

    1.33 Model regeneration PR

    Thank you @yue9944882 , now that the PR is merged, is it possible to do the release soon?

  10. yue9944882 commented on May 23, 2025

    @yue9944882
    Member

    The 24.0.0 and 24.0.0-legacy release is published on maven central, shall be available in ~24hrs.

  11. yue9944882 commented on May 26, 2025

    @yue9944882
    Member

    /close

    The new release is out

  12. k8s-ci-robot commented on May 26, 2025

    @k8s-ci-robot
    Contributor

    @yue9944882: Closing this issue.

    Details

    In response to this:

    /close

    The new release is out

    Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

  13. patroldo commented on May 26, 2025

    @patroldo
    Author

    Hi. Thank you so much guys. Appreciate your help

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