GithubHelp home page GithubHelp logo

falco-inject's Introduction

Falco Inject

Inject Falco and pdig into a running kubernetes pod.

This repo exists to show the concept that Falco + pdig can be injected into running pods without requiring to modify the original image.

Warning: I'm doing expriments here, don't take this seriously.

asciicast

In order to inject, you need a rootfs containing Falco, its dependencies and pdig. Since this is a proof of concept now, I created one from scratch and uploaded it to one of my buckets. It basically contains the Falco pieces bundled in the docker image krisnova/falco-trace:latest. In case you want to create your own rootfs tar, in order for this to work you need the falco binary and the pdig binary.

So you need to download the file rootfs.tar and then run falco-inject that will inject the content of rootfs.tar file from the current working directory into the specified pod with a label selector.

curl -O https://fs.fntlnz.wtf/falco/rootfs.tar
./falco-inject --selector "run=unsecure-falco-example" --namespace default

Full example (I just want to try this!)

kubectl run unsecure-falco-example --image nginx
curl -O https://fs.fntlnz.wtf/falco/rootfs.tar
go build .
./falco-inject --selector "run=unsecure-falco-example" --namespace default

FAQ

Q. How does this connect to kubernetes?

A. It uses your main kubeconfig file, if you expose the KUBECONFIG environment variable, it uses that one

Q. Can I use this in production?

A. Remember that discussion we had about trusting my 1-day-old repositories? USE IT

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.