Skip to main content
Welcome to this tutorial on deploying the Event Generator application on Kubernetes. In this guide, you’ll learn how to verify your prerequisites, clone the repository, review configuration files, and deploy the pod that simulates application events. Before getting started, ensure you have access to your Kubernetes cluster and that both Elasticsearch and Kibana are installed. In our lab environment, these components are pre-installed.
Make sure to run the following command to verify the running pods. If you do not see Elasticsearch and Kibana, check your namespace context.

Step 1: Verify Prerequisites

Run the command below to list the running pods:
If the expected pods are missing, you might be operating in the wrong namespace. Adjust your namespace context using this command (replace efk with the correct namespace if needed):
Then verify the pods again:

Step 2: Clone the Repository

Clone the GitHub repository containing the configuration files needed for the Event Generator pod:
You should see an output similar to:

Step 3: Explore the Repository Structure

Navigate into the cloned repository and list the directories:
Now, switch to the Event Generator folder:
This should display the following files:

Step 4: Inspect the Pod Configuration

Examine the pod configuration in the webapp-fluent-bit.yaml file. This file creates a pod named “app-event-simulator” that pulls the Docker image from the KodeKloud repository. The pod mounts a host directory (/var/log/webapp) to /log within the container so that the logs can be stored properly.

Step 5: Deploy the Pod

Apply the configuration to create the Event Simulator pod:
Clear your screen and verify that the pod is running:

Step 6: Verify Log Generation

To check the logs generated by the event simulator pod, run:
The output should resemble the following sample logs:
The event simulator simulates an e-commerce application by generating various log types (INFO and WARNING) which indicate user activities like page views, login attempts, and order failures. These logs can be analyzed on a dashboard to gain insights into user behavior.

Next Steps

With the Event Simulator application running, the next lesson will guide you through configuring Fluent Bit to collect these logs and forward them to Elasticsearch for analysis. For further information on Kubernetes deployment patterns and logging integrations, consider reviewing the following resources: Happy logging!

Watch Video