istio envoyfilter - logging using lua filter
In this blog, we will be setting envoyfilter that uses lua to intercept and log payload, Ground work We will be using httpbin that is shipped as part of istio samples for our sidecar setup. kubectl apply -f gateway.yaml kubectl apply -f httpbin.yaml And then we can create our envoyfilter. This is what our envoyfilter looks like this. Points to note : we are enabling buffering. Without buffering, the lua won't log and there won't be any output in the istio-proxy container log. Before apply the script below ensure you have set the logging level - otherwise you might not see the logs details. You need to configure the logging level with the following command:- istioctl proxy-config log httpbin-65bbd9c89d-n449w --level lua:info Next we will apply the following script apiVersion : networking.istio.io/v1alpha3 kind : EnvoyFilter metadata : name : log-payload namespace : default spec : workloadSelector : labels : app : h...