Prerequisites

Before you begin, you will need the following tools and accounts:

  • A Kubernetes 1.15+ cluster with your connection configuration set as the kubectl default. To create a Kubernetes cluster on DigitalOcean, read our  Kubernetes Quickstart. To connect to the cluster, read  How to Connect to a DigitalOcean Kubernetes Cluster.
  • Docker installed. Follow our tutorial on  How To Install and Use Docker for instructions.  Docker’s website provides installation instructions for other operating systems like macOS and Windows.
  • An account at  Docker Hub for storing your Docker image.
  • The kubectl command-line tool installed on your local machine and configured to connect to your cluster. You can read more about installing kubectl  in the official documentation, or follow  this tutorial on getting started with Kubernetes: A kubectl  Cheat Sheet.
  • The curl  command-line utility installed on your local machine. You can install curl using the package manager built into your operating system.

Step 1 — Building the Sample Application

In order to test Jaeger’s tracing abilities, we will build and deploy a sample application, sammy-jaeger, which uses two services: one for the frontend and one for the backend. We will build both using  Python and the  Flask microframework.

Our application will be a hit counter whose value increases every time we call the frontend. To simulate performance issues, we will code a randomized sleep function that executes whenever the frontend sends a GET request to the backend. In this step, we will build and deploy that application. In the following steps, we will deploy the app to Kubernetes, install Jaeger, and then use it to trace our service issue.

#kubernetes #jaeger #kubectl #docker hub #kubernetes cluster

How To Implement Distributed Tracing with Jaeger on Kubernetes
1.55 GEEK