Configure Log forwarding from VMware Tanzu Kubernetes Cluster to vRealize Log-Insight

As a personal project, I tested forwarding logs from TKG Cluster to vRealize Log Insight. I would love if anyone is willing to try it and provide feedback

Once the logs are flowing you can create a Dashboard to visualize your TKG environment like the below sample dashboard

Procedure

The following section includes steps for running vRealize Log Insight Fluentd plugin as a Daemon set

Step 1

 Copy the following files from the shared repo https://github.com/munishpalmakhija/log-insight-fluentd 

  • fluent.conf
  • vrli.yaml

Step 2

Update the fluent.conf file with the given configuration. You only need to update details about the log insight endpoint under the match section. I have tested with 2 configs

Config 1

scheme http

ssl_verify false

port 9000

Config 2

scheme https

ssl_verify false

port 9543


Step 3

Create a ConfigMap in Kubernetes for fluent.conf

kubectl -n kube-system create configmap li-fluentd-config --from-file=fluent.conf

Step 4

Apply the creation/changes of new daemon set configuration to the cluster

kubectl apply -f vrli.yaml

You can verify that pod is successfully running

kubectl get pods --all-namespaces | grep log-collector


Verify Logs 

If everything is successful you can search for logs using “environment contains tanzu_k8s_grid”

Leave a Reply

Your email address will not be published.

%d bloggers like this: