Skip to content

az aks command invoke attachment size limit is too small #22870

@jupacaza

Description

@jupacaza

az feedback auto-generates most of the information requested below, as of CLI version 2.0.62

Related command

az aks command invoke -g $Env:AKS_RESOURCEGROUP -n $Env:AKS_CLUSTER_NAME -c "chmod +x deploycharts.sh && ./deploycharts.sh ${Env:AKS_HELMOVERRIDE_ENVIRONMENT}" -f .

The deploycharts.sh looks like this:

#!/bin/bash
# Usage: deploycharts.sh [ENVIRONMENT]

set -ex

echo "Starting helm chart deployments for kube-prometheus-stack using overrides for environment $1"
helm upgrade --install --namespace=prometheus --create-namespace \
    kube-prometheus-stack ./kube-prometheus-stack

echo "Show pods and services:"
kubectl get pods -n prometheus
kubectl get services -n prometheus

echo "Show pods for release:"
kubectl get pods -l "release=kube-prometheus-stack" -n prometheus

and the contents of the folder attached have this structure:

deploycharts.sh
kube-prometheus-stack\
  charts\
  crds\
  values.yaml
  ...(all the other contents of the chart)

Describe the bug

When executing this command to deploy our Prometheus chart (https://prometheus-community.github.io/helm-charts/kube-prometheus-stack:35.4.2) it fails with the following error:

Running az aks command invoke on charts-prometheus...
ERROR: Operation returned an invalid status 'Request Entity Too Large'
aksdeploy.ps1: Error when running az aks command.

The chart is not big (2.08 MB according to Windows Explorer). So what's the attachment size limitation for this command and how can we increase it?

To Reproduce

Pull the chart:
helm pull kube-prometheus-stack --repo https://prometheus-community.github.io/helm-charts --version 35.4.2 --untar --untardir <you-destination-folder>

Then deploy this chart to a kubernetes cluster with the default values using az aks command invoke and use the parameter -f '.' to attach the whole chart.

Expected behavior

Chart deployment should succeed naturally without this error 'Request Entity Too Large'.

Environment summary

Azure Cli 2.32.0

We use Ubuntu images and Azure Container Instances (part of Ev2 Shell extensions https://ev2docs.azure.net/features/extensibility/shell/intro.html?q=adm-ubuntu-1804-l) to run these deployment scripts and deploy to our private AKS cluster. The images are Ubuntu 1804.

Additional context

In the past we've had to split the charts into parts to work around this.

We are a Microsoft team (jucallej@microsoft.com).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions