Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kubetail not display logs of main container when use initContainers #115

Open
EnziinSystem opened this issue Jun 3, 2020 · 1 comment
Open

Comments

@EnziinSystem
Copy link

EnziinSystem commented Jun 3, 2020

kubetail version : 1.6.11-SNAPSHOT

I use the initContainers check status MySQL service when it startup.

...
    spec:
      initContainers:
        - name: init-mysql
          image: busybox
          command: ['sh', '-c', "until nslookup mysql; do echo waiting for mysql; sleep 2; done;"]
      containers:
        - name: app-service
          image: app-service:1.0
...

Kubetail display logs from init containers, when the init containers are complete, it does not display logs of "app-service"

[app-service-6bfc85597c-nrbcm init-mysql] Server:		10.152.183.10 
[app-service-6bfc85597c-nrbcm init-mysql] Address:	10.152.183.10:53 
[app-service-6bfc85597c-nrbcm init-mysql]  
[app-service-6bfc85597c-nrbcm init-mysql] Name:	mysql.default.svc.cluster.local 
[app-service-6bfc85597c-nrbcm init-mysql] Address: 10.152.183.217 
[app-service-6bfc85597c-nrbcm init-mysql]  
[app-service-6bfc85597c-nrbcm init-mysql] *** Can't find mysql.svc.cluster.local: No answer 
[app-service-6bfc85597c-nrbcm init-mysql] *** Can't find mysql.cluster.local: No answer 
[app-service-6bfc85597c-nrbcm init-mysql] *** Can't find mysql.default.svc.cluster.local: No answer 
[app-service-6bfc85597c-nrbcm init-mysql] *** Can't find mysql.svc.cluster.local: No answer 
[app-service-6bfc85597c-nrbcm init-mysql] *** Can't find mysql.cluster.local: No answer 
[app-service-6bfc85597c-nrbcm init-mysql] 

Kube stops here, no logs while "app-service" still working.

@johanhaleby
Copy link
Owner

Never used init containers myself, but I would suspect that this has to do with kubetail not finding the other pods at the time it finds the init container. I think that solving #67 and #33 would also solve this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants