'Kubernetes equivalent for docker compose configuration of logging ( fluentd )
I am using hybrid approach where in for few services I am using simple docker compose approach and for others I am using kubernetes for deployment. For both approaches I want to keep my centralized logging same ( fluentd ). Here is my docker compose file ,
version: "2.1"
services:
inventory:
image: SOME_SERVICE
container_name: SOME_SERVICE
network_mode: "host"
expose:
- "80"
ports:
- "80:80"
mem_limit: 2000m
oom_kill_disable: true
logging: &logging <<-- This Part
driver: fluentd
options:
fluentd-address: IP:PORT
tag: "server.{{.Name}}"
I want convert this logging part to the equivalent kubernetes configuration. How can I do this ?
Solution 1:[1]
There are no options to control logging in a Pod spec. Instead, you need a cluster-wide log collector. Logging Architecture in the Kubernetes documentation describes the setup. As a programmer this isn't something you control, you'll have to ask your cluster administrator or your local DevOps team to configure it for you.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | David Maze |
