Zum Hauptinhalt springen
tsecurity.de LIVE
Echtzeit-Radar & Feeds
Alle RSS Feeds
👥 Community & Social
YouTube Security VideosGoogle Cloud Tech: Gemini is coming to your city(24.09.2026 um 15:00 Uhr)
AI & KI NachrichtenGoogle’s latest moonshot to put machine learning in space(24.09.2026 um 15:12 Uhr)
Windows Tipps & SecurityPoll: What's your favorite Surface of 2026?(24.09.2026 um 14:58 Uhr)
Sichere ProgrammierungStreaming Materialized Views for Live Read Models (2026)(24.09.2026 um 15:02 Uhr)
Sichere ProgrammierungA Day Is Not 86400 Seconds: The DST Bug in Your Date Math(24.09.2026 um 15:02 Uhr)
Sichere ProgrammierungSetting up Traefik: reverse proxy with automatic HTTPS(24.09.2026 um 15:02 Uhr)
Sichere ProgrammierungA 200 OK response does not prove a secret leak(24.09.2026 um 15:02 Uhr)
Sichere ProgrammierungHow hot do you like it?(24.09.2026 um 15:05 Uhr)
YouTube Security VideosGoogle Cloud Tech: Gemini is coming to your city(24.09.2026 um 15:00 Uhr)
AI & KI NachrichtenGoogle’s latest moonshot to put machine learning in space(24.09.2026 um 15:12 Uhr)
Windows Tipps & SecurityPoll: What's your favorite Surface of 2026?(24.09.2026 um 14:58 Uhr)
Sichere ProgrammierungStreaming Materialized Views for Live Read Models (2026)(24.09.2026 um 15:02 Uhr)
Sichere ProgrammierungA Day Is Not 86400 Seconds: The DST Bug in Your Date Math(24.09.2026 um 15:02 Uhr)
Sichere ProgrammierungSetting up Traefik: reverse proxy with automatic HTTPS(24.09.2026 um 15:02 Uhr)
Sichere ProgrammierungA 200 OK response does not prove a secret leak(24.09.2026 um 15:02 Uhr)
Sichere ProgrammierungHow hot do you like it?(24.09.2026 um 15:05 Uhr)
Intelligence View
⚡ tsecurity.de Intelligence

How I added initContainers and env vars to every deployment without Kyverno

TL;DR We needed to modify deployments in the background and decided against Kyverno (too big). Instead a leightweight mutating Webhook called "kTailor" was built and published under Apache 2.0. Its main purpose is to insert env vars,…

0
↗ Quelle (dev.to)
Reagiere als Erste:r — dein Feedback zählt!




TL;DR



We needed to modify deployments in the background and decided against Kyverno (too big). Instead a leightweight mutating Webhook called "kTailor" was built and published under Apache 2.0. Its main purpose is to insert env vars, initContainers and sidecars.






The Starting Point



Moving containers through time in a customer project, we're adding libfaketime to each deployment via an initContainer - banks sometimes need to do that to check if the software works fine on new years day. This method can be turned on and off easily by a switch in a central helm chart which is used for all internal apps. So far, so good.



Then came the first external app, and we didn't want to mess with its helm chart every time we wanted it to travel through time. So what to do if you've need to go back to 1985 but don't have 1.21 GW?






The Motivation



Well, there's Kyverno. Besides enforcing rules and policies it's capable of modifying deployments in the background without having to touch the helm chart - exactly what we needed. But I found that Kyverno is also a heavy weight and a bit oversized for our needs. Besides, there's all that paperwork to get allowance to run another external app deep inside your clusters ...



So I decided to write a small, generic Mutating Webhook that fits to our needs.






What kTailor does



kTailor is written in Go and thus practically Kubernetes native. Its goals on mutating a deployment (and no other k8s ressources) are the following:




  • Modify the main container and


    • add, modify or remove env vars

    • add or remove volumeMounts



  • Add initContainers

  • Add sidecar containers

  • Add volumes



That's more than enough in many cases. It enables us to inject the libfaketime library in the background and thus move the containers "through time". The technique is the same as used by many products like Dynatrace, Istio and others, every case when one needs to add a sidecar or initcontainer in the background.



With kTailor, now you can do it on your own. The software is Open Source and free to use. It's syntax is that of a simple k8s deployment and thus easy to handle - no need to learn to write Kyverno policies.






How it works



All rules for modification are stored in a simple configMap of which you can have as many as you need. You can store these templates aside your app in its namespace ("local") or in kTailors namespace ("central"). Important: The configMap needs a special to motivate kTailor to load it in its cache, like:



ktailor.dev/template: "true"



The trigger point is a label, too. Add a label like the following to a deployment and kTailor will add/modify the objects that are mentioned in your template:



ktailor.dev/fit: "central.my-template"






Online ressources



You'll find the repo at github and the documentation at ktailor.dev. And there's an online demo at killercoda.com that you can try for free: The scenario spawns a small one-node kubernetes cluster and installs the webhook along with two small demo applications.






Have fun



Maybe it's useful for some other k8s users, e.g. to




  • insert a http proxy sidecar to see where your app sends requests to (without you knowing?), or

  • insert a proxysql sidecar to track and measure the apps database calls, maybe to find and optimate the slower ones.



Have fun with kTailor and I'm looking forward to your feedback.

CTI Threat Relationship Graph2 Knoten / 1 Relationen
CVE / Incident Software MITRE ATT&CK CWE Weakness IoC
SOC Incident Playbook: Remote Code Execution (RCE) Defense
title: Detect Exploitation - How I added initContainers and env vars to every deployment without Kyverno
id: d5c2ac54-b55f-48cb-ab04-d6b4ce33e1fc
status: experimental
description: Automatisch generierte SIEM-Erkennungsregel basierend auf CTI Intelligence
references:
  - https://tsecurity.de/
author: iShareStuff CTI Automated Detection Engine
date: 2026-09-24
logsource:
  category: network_connection
  product: any
detection:
  selection:
      CommandLine|contains:
        - 'exploit'
  condition: selection
falsepositives:
  - Legitime administrative Zugriffe oder Penetrationstests
level: high
tags:
  - attack.initial_access
rule CTI_Threat_Indicator {
    meta:
        author = "iShareStuff CTI Automated Detection Engine"
        date = "2026-09-24"
        description = "YARA Signature for "
    strings:
        $str = "How I added initContainers and" ascii wide
    condition:
        any of them
}
tsecurity.de Cognitive Threat RAG
Fokus-Vektor:

Kognitive Analyse für identifizierte Bedrohung: Erhöhte Bedrohungslage im Bereich How I added initContainers and env vars .... Basierend auf 368k Vektor-Korrelationen werden sofortige Isolationsmaßnahmen für betroffene Endpunkte empfohlen.

🛡️ Angriffsfläche & Exposure

Netzwerk/Remote-Zugriff ohne Vorauthentifizierung möglich.

Empfohlene Sofortmaßnahmen
  • 1. Perimeter-Inspektion: Relevante Portfreigaben und exponierte Endpunkte unverzüglich scannen.
  • 2. Patch-Applikation: Hersteller-Hotfix einspielen oder betroffene Daemons in isolierte DMZ-Segmente überführen.
  • 3. Telemetrie & EDR-Alerts: Prozessaufrufe und Child-Processes auf anomale Shell-Spawns überwachen.
🔗 Semantisch verwandte Zero-Days MariaDB 11.7 VEC
Zum Aktualisieren ziehen
ZERO-DAY CVE-2026-97179 | A security vulnerability has been detected in O2OA up to 9.5.3/10.0.2. T…
Advisory →
TTS Reader • tsecurity.de Voice
tsecurity.de Icon
tsecurity.de App
Offline-Lesen, Eilmeldungen & 0ms Ladezeit

Installiere tsecurity.de direkt auf deinen Home-Bildschirm für das ultimative Vollbild-Magazinerlebnis ohne Browser-Leisten.

Nächster Beitrag
Themen-Radar & Intelligence Matrix
Echtzeit-Taxonomie nach Angriffsvektoren & Plattformen

tsecurity.de Live Threat Radar

🔴 LIVE RADAR
MONITORING
AKTIV
CVE-DATENBANK
LIVE
🔍
Community Radar & Live Chat
Sentinel Bot online • Live-Stream
Dein Cluster: Security Explorer
Match:
lädt…
Verbindung zum Community-Stream wird aufgebaut...
Bearbeitungsmodus — Senden überschreibt deine Nachricht
Community-Puls — was gerade passiert
lädt…
Aktivitäten deiner Analysten
lädt…
Neues Thema oder Eilmeldung einreichen

Reiche interessante Links, Zero-Days oder Debatten ein. Die Community entscheidet per Upvote über die Veröffentlichung.

Heiß diskutierte Einreichungen
🔖 Gespeicherte Artikel
📂 Keine gespeicherten Artikel vorhanden.
Zurück Ziehen Vor
Links: vorheriger Artikel Rechts: nächster Artikel unten: schließen
News NIS-2 Frühwarnung Tier-1 Intel TTP ⏱️ 3 Min vor 10 Min
Artikeldaten werden geladen...

Zurück: vorheriger Vor: nächster
↗ Original-Quelle
Social Reaktionen Deine Reaktion zählt
Einstufung & Relevanz-Poll 0 Stimmen
In sozialen Netzwerken teilen 1-Klick