An open API service indexing awesome lists of open source software.

https://github.com/theykk/logger

Kubernetes logs to MongoDB
https://github.com/theykk/logger

docker hacktoberfest kubernetes logging mongodb nodejs

Last synced: about 1 year ago
JSON representation

Kubernetes logs to MongoDB

Awesome Lists containing this project

README

          

[![](https://img.shields.io/twitter/follow/YkkCode.svg?style=social)](https://twitter.com/YkkCode "Twitter: YkkCode")
[![](https://images.microbadger.com/badges/image/theykk/logger.svg)](https://microbadger.com/images/theykk/logger )
[![](https://images.microbadger.com/badges/version/theykk/logger.svg)](https://microbadger.com/images/theykk/logger )
[![dockeri.co](https://dockeri.co/image/theykk/logger)](https://hub.docker.com/r/theykk/logger)

# TheYkk K8S Logger

This tool runs a pod at every node in K8s via deamonset.
The pod connects node's /var/log/containers folder and adds to mongodb by collecting logs

![Parse](./log1.png)

Supports 25 Parsers

![Parse](./log2.png)
Average log size ~ 700 byte

![Parse](./log3.png)

## Installation

Create mongodb url secret

```sh
kubectl create secret generic theykk-logger --from-literal=MONGO_URI=
```

Apply rbac and deamonset

```sh
kubectl apply -f https://raw.githubusercontent.com/TheYkk/logger/master/rbac.yaml

kubectl apply -f https://raw.githubusercontent.com/TheYkk/logger/master/deamonset.yaml
```

## Buil docker image

```sh
DOCKER_BUILDKIT=1 docker build -t theykk/logger .
```

and push the docker hub

```sh
docker push theykk/logger
```

## Author

👤 **TheYkk <Kaan Karakaya yusufkaan142@gmail.com>**

* Twitter: [@YkkCode](https://twitter.com/YkkCode)
* Github: [@TheYkk](https://github.com/TheYkk)

## Show your support

Give a ⭐️ if this project helped you!

## License

[APACHE](https://choosealicense.com/licenses/apache-2.0/)