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

No logs if namespace is empty #130

Open
n0madic opened this issue Aug 7, 2019 · 4 comments
Open

No logs if namespace is empty #130

n0madic opened this issue Aug 7, 2019 · 4 comments

Comments

@n0madic
Copy link

n0madic commented Aug 7, 2019

The tracker does not display logs if the namespace is empty (default)

Reproduce the problem:

$ kubedog follow deployment example -n ''
# deploy/example appears to be ready
# deploy/example new rs/example-5795c486d added
# deploy/example rs/example-7d5d8f9446 added
# deploy/example rs/example-5764c48d46 added
# deploy/example rs/example-5795c486d(new) po/example-5795c486d-69pfb added
# deploy/example event: po/example-5795c486d-69pfb Killing: Stopping container kube-state-metrics
# deploy/example rs/example-5795c486d(new) po/example-5795c486d-8hwvz added
# deploy/example event: po/example-5795c486d-8hwvz Pulled: Container image "k8s.gcr.io/kube-state-metrics:v1.5.0" already present on machine
# deploy/example event: po/example-5795c486d-8hwvz Created: Created container kube-state-metrics
# deploy/example event: po/example-5795c486d-8hwvz Started: Started container kube-state-metrics
# deploy/example become READY
@distorhead
Copy link
Member

Hello, thanks for reporting!

By the way follow tracker is deprecated, it is better to use multitracker: https://github.com/flant/kubedog#multitracker-cli. It has a minimal viable cli support thought and namespace should be specified fully also. I think this problem also affects multitracker.

@n0madic
Copy link
Author

n0madic commented Aug 8, 2019

hmm, it seems the multitracker does not show logs at all ...

@distorhead
Copy link
Member

Pods logs (logs from program, not kube events) are shown by default and kube events and other system stuff is not shown by default. Try option ShowServiceMessages to show system messages:

cat << EOF | kubedog multitrack
{
  "Deployments": [
    {
      "ResourceName": "mydeploy22",
      "Namespace": "myns"
      "ShowServiceMessages": true,
    }
  ]
}
EOF

There are many options available for multitracker: https://github.com/flant/kubedog/blob/master/pkg/trackers/rollout/multitrack/multitrack.go#L57 (for now source code is the documentation).

@n0madic
Copy link
Author

n0madic commented Aug 8, 2019

I missed "Namespace" :)

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