Skip to content

az aks get-credentials does not merge the kubeconfig when it was converted with azure kubelogin #23475

@TobiTh

Description

@TobiTh

Describe the bug

When the kubeconfig was converted with the azure kubelogin tool by kubelogin convert-kubeconfig, the next aks credential downloads will not be correctly merged into the kubeconfig file.
The az aks get-credentials command will simply return (cluster name redacted)

Merged "CLUSTER_NAME" as current context in C

The kubeconfig file will not be edited by the command. I needed to manually add the new context, clusters and user to the file.

Command Name
az aks get-credentials

To Reproduce:

Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information.

  • kubelogin convert-kubeconfig
  • az aks get-credentials --resource-group {} --name {}
  • Merged "CLUSTER_NAME" as current context in C

Expected Behavior

The kubernetes context will be merged into the existing kubeconfig

Environment Summary

Windows-10-10.0.19044-SP0
Python 3.10.4
Installer: MSI

azure-cli 2.37.0 *

Extensions:
managementpartner 0.1.3

Dependencies:
msal 1.18.0b1
azure-mgmt-resource 21.1.0b1

Additional Context

Metadata

Metadata

Assignees

No one assigned

    Labels

    AKSaz aks/acs/openshiftAuto-AssignAuto assign by botService AttentionThis issue is responsible by Azure service team.act-observability-squadcustomer-reportedIssues that are reported by GitHub users external to the Azure organization.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions