apt install command is stuck when executing within a pod

The problem

The apt install command gets stuck when run from within a pod, in a cluster with a Panoptica controller already installed. This error message appears:

X% [waiting for headers]

After a while (few minutes) the installation completes.


This is an issue of apt http/1.1 pipelining. To solve this, add the following to /etc/apt/apt.conf.d/piplining-off.conf:

Acquire::http::Pipeline-Depth "0";