Given that Pushgateway and Envoy does not have capability to decompression gzipped request yet, here we are using the NGINX Extras with lua script to unzip the gzipped request then proxy it to the Pushgateway, implemented as a Kubernetes sidecar.
Tools we'll be using:
- Howto make Nginx decompress a gzipped request
- Implementing A Reverse Proxy Server In Kubernetes Using The Sidecar
Start minikube
,
minikube start
Once minikube is started, run
eval $(minikube docker-env)
to get hooked up to the Minikube Docker daemon (which we'll be using when we build Docker images later).
In nginx-extras-with-unzip
folder, run
docker build -t nginxsidecar .
You should see your docker image on your local docker registry.
In root folder, run:
kubectl apply -f pushgateway_deployment.yaml
If you are running on Linux, you can start node-exporter
.
Use push_node_exporter_metrics.sh
to push metrics in gzipped format to the Pushgateway.
./push_node_exporter_metrics.sh
If all good, you should see 200
response code from the aforementioned command.