Skip to content

az k8s-extension show/update fails with InvalidApiVersionParameter — hardcoded api-version 2023-05-01 no longer valid #9789

@cwedgwood

Description

@cwedgwood

Describe the bug

az k8s-extension show and az k8s-extension update fail with InvalidApiVersionParameter because the vendored SDK uses DEFAULT_API_VERSION = '2023-05-01' which has been removed from the supported API versions on some subscriptions.

Error message

ERROR: (InvalidApiVersionParameter) The api-version '2023-05-01' is invalid. The supported versions are '2025-04-01,2025-03-01,2024-10-01-preview,2024-11-01,...'

Source

src/k8s-extension/azext_k8s_extension/vendored_sdks/_source_control_configuration_client.py:

DEFAULT_API_VERSION = '2023-05-01'

Workaround

Use az rest directly with a current API version:

az rest --method GET \
  --url "https://management.azure.com/subscriptions/<sub>/resourceGroups/<rg>/providers/Microsoft.Kubernetes/connectedClusters/<cluster>/providers/Microsoft.KubernetesConfiguration/extensions/<name>?api-version=2024-11-01"

Extension version

k8s-extension 1.7.0

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions