Enabling Gzip compression on azure kubernetes service

SaladiVaraprasad-1079 0 Reputation points
2023-04-10T16:54:02.56+00:00

Hello Team, we need to enable the Gzip compression . we have our application hosted in AKS and we use the Application gateway Ingress controller . Could you please help us on enabling the Gzip compression .

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.
2,447 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Ammar-Abdlqader 1,176 Reputation points Microsoft Employee
    2023-04-11T09:26:16.21+00:00

    Hello @SaladiVaraprasad-1079 Thank you for your question, I see a similar question from this link: https://learn.microsoft.com/en-us/answers/questions/661249/enable-gzip-compression-in-azure-application-gatew

    here AGIC on AKS is managed by add-ons, and any change on the configurations will be un-supported on AGIC configurations, for manual changes you can use the Azure Application gateway, but to achieve that by your responsibility to enable g-zip on AGIC,you can try it on a test AGIC with AKS as below: 1- Run the following command to edit the AGIC configuration file:

    kubectl edit configmap agic-config -n kube-system
    
    
    

    2- Add the following lines to the data section of the configuration file: enable-compression: "true" compression-type: "gzip" 3- Save and exit the configuration file. 4- Restart the AGIC pod by running the following command: kubectl delete pod -n kube-system -l app=agic 5- Verify that Gzip compression is enabled by checking the response headers of a request to your application. Please note that enabling Gzip compression may increase CPU usage on the Application Gateway Ingress Controller Hope this helps. Please "Accept as Answer" if it helped, so that it can help others in the community looking for help on similar topics.


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.