SShortSingh.
Back to feed

How a sidecar proxy intercepts pod traffic using iptables without app changes

0
·1 views

A sidecar proxy can handle features like telemetry, mTLS, circuit breaking, and retries for many applications without reconfiguring each one, but only if the app never realizes traffic is being routed through it. The article explains that this is achieved by making the proxy transparent, using iptables rules in the Linux kernel to redirect inbound and outbound traffic to the sidecar. Outbound traffic is redirected to a proxy port, while the sidecar's own traffic, localhost, and API server calls are exempted to avoid loops. A common pitfall is an infinite redirect loop caused by the sidecar's own requests, which is solved by exempting traffic owned by its user ID. The init container that applies these rules needs elevated network privileges, since modifying kernel netfilter rules is a restricted operation.

Read the full story at DEV Community

This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)

Log in to join the discussion and vote.

Log in

Related stories

0
ProgrammingDEV Community ·

The Lazy Python Tutor: A Chatbot That Answers Coding Questions in Plain Language

A developer has built a Streamlit-based app called The Lazy Python Tutor, aimed at people who want quick answers instead of a full course. Users ask a single question and receive a plain-language explanation along with one small example. The project was submitted to the Hacktoberfest 2026 DEV Challenge and is available as both a live app and open-source code on GitHub. Planned future features include an error-explanation tool for absolute beginners, voice input, and a feature that turns chat history into short recap cards. The creator describes the core goal as complete, with the focus now on possible extensions.

0
ProgrammingDEV Community ·

MagicRemover Explains Why Its AI Eraser Re-renders Entire Photos

A developer of the browser-based AI eraser MagicRemover found that two of its help pages gave conflicting accounts of how edits affect a photo. Tracing the pipeline showed that instruction-based editing regenerates the whole image from a text prompt, so the brushed area is not the only part that changes. The company switched from mask inpainting, which leaves untouched pixels identical to the original, to an instruction-following editor in June, improving shadow handling. Before any upload is sent, images are downscaled to about one megapixel, and a vision-language model labels the marked subjects from a red-filled copy. The post notes that some site copy still described the older behaviour.

0
ProgrammingDEV Community ·

Context-shrinking tool cut AI agent token use 78% but lost two answers

A developer tested Hexum, a hosted MCP server that trims code before sending it to an AI model, against sending full files and against no files. Across 10 questions about open-source Python and TypeScript libraries, the trimmed approach cut tokens sent to the model by a median of 77.7%. Accuracy fell from 9 of 10 with full files to 7 of 10 with Hexum. Analysis of the misses showed the answer files were shown only by bare filename without their folder path, causing the agent to search wrong locations. The author also reported a bug in which repeated requests returned empty views, which the founder fixed within two days.

0
ProgrammingDEV Community ·

Developer builds replacements for four discontinued Flutter packages

After Flutter's team announced it was discontinuing several first-party packages with no replacement plan, one developer set out to address the gap in their own projects. They built the Prism family, a set of 15 pure-Flutter packages that avoid platform channels. The replacements cover discontinued libraries including flutter_markdown, palette_generator, flutter_adaptive_scaffold, and flutter_image. The developer reports lessons on treating issue threads as a product roadmap, prioritizing maintainability, and testing replacements carefully. All packages are released under the MIT license and linked from the developer's profile.