1

I'm running an AKS (Azure Kubernetes Service) cluster, but now when try to reach the logs I'm getting the issue below, which is weird because I wasn't facing it.

Issue:

kubectl logs -n default hello-display-759947d684-782n5
2021/11/02 08:11:04 Failed to read tracing config, using the no-op default: empty json tracing config

Expected behavior:

I expect the logs to be displayed.

Additional information:

kubectl version
Client Version: version.Info{Major:"1", Minor:"21", GitVersion:"v1.21.5", GitCommit:"aea7bbadd2fc0cd689de94a54e5b7b758869d691", GitTreeState:"clean", BuildDate:"2021-09-15T21:10:45Z", GoVersion:"go1.16.8", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"20", GitVersion:"v1.20.9", GitCommit:"ed93e7ea8f833824d05578765c2ad3efbebbfebe", GitTreeState:"clean", BuildDate:"2021-10-21T03:31:08Z", GoVersion:"go1.15.14", Compiler:"gc", Platform:"linux/amd64"}

Thank you in advance.

2 Answers2

0

I would not consider that an issue, but a warning. That hello-display seems to be using the Knative library that you can find here:

If you want to configure observability without falling back to defaults, you should add those items environment variables to that hello-display, which is usually done by reading a ConfigMap. For reference, you can find the default config being used at the core eventing components here.

  • Hi, it's weid because this pod hello-display is from the Knative itself. – Anderson Soares Nov 02 '21 at 11:18
  • I'm following this https://knative.dev/docs/eventing/getting-started/ and doesn't say about the ConfigMap. :( – Anderson Soares Nov 02 '21 at 11:19
  • The message you are getting is not an error, but a warning that some defaults are being applied. But that binary is not using the v2 adapter library, it expects this `K_CONFIG_TRACING` variable containing the tracing configuration as expected by Knative binaries: https://github.com/knative/eventing/blob/1e4fa3571ad7f08ddae9a7558aee3b508334e3f4/cmd/event_display/main.go#L74-L77 – Pablo Mercado Nov 02 '21 at 15:42
  • Do you have any idea how to fix that ? – Anderson Soares Nov 02 '21 at 15:50
  • I think there is nothing to fix here. If you take a look to the source above, what you are seeing is the only log being written in the happy path. The only reason you would like to add the tracing config is to enable tracing and plug something like zipkin or jaeger, which I am not sure if that is your intention. The logs you are getting are the ones you are intended to get. Check that out here: https://github.com/knative/eventing/blob/1e4fa3571ad7f08ddae9a7558aee3b508334e3f4/cmd/event_display/main.go#L67-L85 Those are the only logs written by the app you are running. – Pablo Mercado Nov 02 '21 at 22:38
0

It sounds like kubectl is handing you the logs from the queue-proxy container installed by Knative, rather than the user-container. Try this command:

kubectl logs -n default hello-display-759947d684-782n5 -c user-container

Alternatively, AKS may have a centralized log service which you can use to view the logs for current and past pods, which should allow you to select which container you're viewing.

E. Anderson
  • 3,405
  • 1
  • 16
  • 19