kubectl version in command- pod too old

Paul Vogt 0 Reputation points
2025-08-07T13:49:33.2133333+00:00

How to get a newer kubectl version in the command- pod started in the aks-command namespace. After upgrading the aks kubernetes cluster to 1.32.6, I get the result below.

az aks command invoke
  --resource-group $AKS_RESOURCE_GROUP
  --name $AKS_CLUSTER_NAME
  --command "kubectl $*"

results in

command started at 2025-08-07 13:45:05+00:00, finished at 2025-08-07 13:45:06+00:00 with exitcode=0 Client Version: v1.30.5 Kustomize Version: v5.0.4-0.20230601165947-6ce0bf390ce3 Server Version: v1.32.6 WARNING: version difference between client (1.30) and server (1.32) exceeds the supported minor version skew of +/-1

Azure Kubernetes Service
Azure Kubernetes Service
An Azure service that provides serverless Kubernetes, an integrated continuous integration and continuous delivery experience, and enterprise-grade security and governance.
{count} votes

2 answers

Sort by: Most helpful
  1. Paul Vogt 0 Reputation points
    2025-08-08T08:21:55.5866667+00:00

    Hi Durga

    The older version of kubectl does not cause an issue for me now. At the moment the az aks command invoke is the easiest method to get some information out of a private aks cluster for me. I just wondered why the kubectl version used by 'az aks command invoke' is 1.30.5, since kubernetes 1.32 is available on Azure for some time now and 1.33 is close to it release date I think.

    Alse we disabled the exec function on the cluster for security reasons.


  2. Akram Kathimi 1,751 Reputation points Microsoft Employee
    2025-08-10T12:00:56.1833333+00:00

    HI @Paul Vogt

    Thank You for Posting This Question

    The az aks command invoke command essentially creates a pod in the cluster to run the command you provide. Here’s how it works:

    • The pod is created in the aks-command namespace.
    • It uses the container image: mcr.microsoft.com/aks/command/runtime:<tag>.
    • This image is continuously maintained and receives regular updates. The latest release, as you mentioned, is using client version v1.30.5.

    Since this image is managed by Microsoft, you unfortunately cannot upgrade the client version yourself.

    If this information helped you, please accept the answer. This helps us and others in the community as well. Thank you!


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.