Skip to content

K8s环境下如何快速开发调测? #288

Answered by yyuuttaaoo
messixukejia asked this question in Help
Discussion options

You must be logged in to vote

0、如果想要基于官方镜像包进行调试,那么需要用bash覆盖官方镜像的entrypoint,然后再跳入容器进行操作。
docker:docker run -it --name docker_ilogtail -v /:/logtail_host:ro -v /var/run:/var/run aliyun/ilogtail:edge bash
k8s:用command覆盖entrypoint

       command:
            - sleep
            - 'infinity'
      # 删除livenessProbe,要不然会因为探测不到端口重启

1、如何基于官方镜像包打开debug日志,并重启进程生效?
开源ilogtail的pod在ilogtail namespace,通过kubectl get pod -n ilogtail可以找到对应pod
进入pod,kubectl exec -it -n ilogtail xxx -- bash
ls查看当前目录。
apsara_log_conf.json文件控制c++ core日志打印级别。替换"AsyncFileSink" : "INFO""AsyncFileSink" : "DEBUG"就能打开debug日志。
plugin_logger.xml文件控制go plugin日志打印。替换minlevel="info"minlevel="info"就能打开debug日志。
修改日志级别后需重启ilogtail生效。
直接kill ilogtail后重新启动即可。(./ilogtai…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by messixukejia
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants