Simple golang application that exposes container logs as a grpc service.
The server has two rpc:
rpc GetLog (Pod) returns (PodLog);
rpc StreamLog (Pod) returns (stream PodLog);
_hack/example/ contains example clients for both rpcs
-
Start a kind cluster with local docker registry enabled
./_hack/setup_kind.sh
-
Build ploggi docker image using ko
make local-image
-
Push image to local registry
make push-local
-
Apply manifests to kind cluster
make apply-kind
-
Forward port to service in kind cluster
kubectl port-forward svc/ploggi 8080:8080
-
Start stream client
go run _hack/examples/ploggi_stream_client/stream.go <ploggi-pod-name> ploggi
-
Execute get client
go run _hack/examples/ploggi_get_client/get.go <ploggi-pod-name> ploggi
Ploggi will log every time the get rpc is executed and logs should be streamed to the stream client.