nginxinc / nginx-loadbalancer-kubernetes

A Kubernetes Controller to synchronize NGINX+ Resources with Kubernetes Ingress Resources
Apache License 2.0
58 stars 19 forks source link

Use a nicer command to tail pod logs #174

Closed puneetsarna closed 7 months ago

puneetsarna commented 7 months ago

While what we have also works, labels is a nicer way to select k8s objects.

nginx-loadbalancer-kubernetes $ kubectl -n nlk logs -f $(kubectl -n nlk get po -l "app=nlk" --no-headers -o custom-columns=":metadata.name")
time="2024-02-28T20:35:49Z" level=info msg="Settings::Initialize"
time="2024-02-28T20:35:49Z" level=info msg="Certificates::Initialize"
time="2024-02-28T20:35:49Z" level=info msg="Certificates::Run"
I0228 20:35:49.398213       1 shared_informer.go:273] Waiting for caches to sync for nlk-handler
I0228 20:35:49.500005       1 shared_informer.go:280] Caches are synced for nlk-handler

Proposed changes

Describe the use case and detail of the change. If this PR addresses an issue on GitHub, make sure to include a link to that issue using one of the supported keywords here in this description (not in the title of the PR).

Checklist

Before creating a PR, run through this checklist and mark each as complete.

puneetsarna commented 7 months ago

@ciroque @chrisakker