K8sidecar: A Modular Kubernetes Chain of Sidecar Proxies for Microservices and Serverless Architectures
Andoni Salcedo‐Navarro, Miguel García, Juan Gutiérrez‐Aguado · Software Practice and Experience · 2025
ABSTRACT Background Modern microservice architectures demand not only modularity, scalability, and maintainability but also adaptation to dynamic requirements. For applications deployed on Kubernetes, sidecar proxies have been used to separate the operational features (such as security, networking, or monitoring) from the application business logic by intercepting traffic to and from microservices or functions in serverless platforms. Existing proxy sidecar implementations such as Envoy offer these operational features as chains of logic that cannot be composed at deployment time. Objective This work introduces K8Sidecar, which leverages the operator pattern to dynamically integrate a chain of proxy sidecar containers into microservices or serverless architectures deployed on top of Kubernetes. Methods The study presents the architecture of the software and describes the Java and Go libraries provided to develop new proxy sidecars. Results We provide illustrative examples and evaluate the impact of the number of injected sidecars on cold‐start and latency and compare them with Envoy. Conclusion Results show that for up to 5 sidecars, the chain‐of‐sidecars approach (especially using the Go library) remains reasonably close to Envoy in terms of both cold start and latency.