Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to configure log-driver in kubernetes pods file?

below is docker run command:

docker run --log-driver=syslog 

How to set log-driver in kubsernetes pods. Can you show examples to me? Thanks...

like image 647
david guo Avatar asked Mar 01 '16 10:03

david guo


People also ask

How do you get logs for a Kubernetes pod?

To get Kubectl pod logs, you can access them by adding the -p flag. Kubectl will then get all of the logs stored for the pod. This includes lines that were emitted by containers that were terminated.

How do I edit a pod configuration file?

Edit a PODRun the kubectl edit pod <pod name> command. This will open the pod specification in an editor (vi editor). Then edit the required properties.

Where are Kubernetes pod logs stored?

By default, the kubelet writes logs to files within the directory C:\var\logs (notice that this is not C:\var\log ). Although C:\var\log is the Kubernetes default location for these logs, several cluster deployment tools set up Windows nodes to log to C:\var\log\kubelet instead.


1 Answers

There is an open feature request for this, but it's not yet supported: https://github.com/kubernetes/kubernetes/issues/15478

like image 164
briangrant Avatar answered Nov 15 '22 03:11

briangrant