echo "123123213" >> /var/log/tac_plus/access/access.log
k8s dashboard 日志并没有输出 但是本地是可以的
如下是我的脚本,是我写错了 还是 k8s 对容器的日志有特别的处理?
Dokerfile
FROM ubuntu:20.04
RUN mkdir -p /var/log/tac_plus/access/
RUN mkdir -p /var/log/tac_plus/accounting/
RUN mkdir -p /var/log/tac_plus/authentication/
RUN mkdir -p /var/log/tac_plus/authorization/
ADD ./access.log /var/log/tac_plus/access/access.log
ADD ./accounting.log /var/log/tac_plus/accounting/accounting.log
ADD ./authentication.log /var/log/tac_plus/authentication/authentication.log
ADD ./authorization.log /var/log/tac_plus/authorization/authorization.log
ADD ./docker-entrypoint.sh /
RUN chmod +x /docker-entrypoint.sh
CMD ["bash","-c","/docker-entrypoint.sh"]
docker-entrypoint
#!/bin/sh
echo "Starting server..."
{
tail -f /var/log/tac_plus/access/access.log
}&
{
tail -f /var/log/tac_plus/accounting/accounting.log
}&
{
tail -f /var/log/tac_plus/authentication/authentication.log
}