Max connections to Kubernetes API is set to 32 by default in the shared cloud configuration but this doesn't prevent the K8s plugin to open hundreds of connections to the K8s API, each connection using 2 threads leading to an exhaustion of the available memory.
The consequences of the bug are instabilities and crash of masters when all available memory in the master container is exhausted.
Each time the plugin needs to connect to K8s, it creates a new client object. Each client is limited to 32 connections but there's no limit on the number of clients created. The client object should be a singleton.