Difficulty: medium
Estimated Time: 30 minutes

In this scenario we will deploy an example microservice voting app in Kubernetes that issues votes for your favourite: dogs or cats. Results are stored in a database and then a report can be generated with the results.

Suddenly there are more people voting using our application and the app becomes slower and slower. In this lab we will find the microservices bottleneck and check how we can scale this application to handle the required load.

Goals

  • Explore a microservices application using Sysdig Monitor:
    • How many nodes and containers I have on my cluster?
    • Where is each container running?
    • How this microservices application works?
    • Which services talk to each other?
    • What's running inside each container and microservice?
  • Monitor a web services application. Key metrics and monitoring approaches: Golden signals, USE resource monitoring and SQL connectivity and performance.
  • Diagnose a failed application update, set the alerts, notification channels and captures to react immediately and be able to find the root cause if this situation arises in any of your Kubernetes namespaces.
  • Use Sysdig captures and Sysdig Inspect to deep dive into the system calls and perform troubleshooting using syscall tracing. In this lab we will be able to detect a surge in SQL errors and diagnose the precise PostgreSQL client and query that have been modified in the new version of the app and is causing the problem.

Competencies required

The student needs to understand the basic concepts of microservices applications, containers and Kubernetes, and be able to check the status of deployed Kubernetes resources (pods, deployments, services) and nodes.

If you have not done it yet, it's a good idea to complete the previous scenario, Application performance analysis, before this one.

During this lab we have seen how Sysdig Monitor provides deep visibility into your containerized infrastructure and out of the box allows to:

  • Explore the containerized infrastructure and a microservices applications.
  • Monitor a web services application. Key metrics and monitoring approaches:
    • Golden signals and application metrics monitoring
    • USE resource and container limits monitoring
    • Kubernetes orchestration and kube-state-metrics monitoring
    • SQL errors, average and maximum latency, most common and slowest requests
  • Unequivocally correlate Kubernetes events with degraded service metrics
  • Follow an SQL conversation down to the syscall level of detail, inspecting the specific pod interaction that triggered the error.

Sysdig Monitor Lab 02: Monitoring an application deployment

Step 1 of 8

Setting up the environment

We have set up a Kubernetes cluster just for you. On the right you can see the terminal of the master node, from which you can interact with the cluster using the kubectl tool, which is already configured.

For instance, you can get the details of the cluster executing kubectl cluster-info

You can view the nodes in the cluster with the command kubectl get nodes

You should see 2 nodes: one master and a worker.

Check that you are admin: kubectl auth can-i create node

In order to follow this course, you will need a Sysdig Monitor account, with Administrator access privileges.

Log in the Sysdig Monitor web UI, go to your profile Settings, and in the Agent Installation tab you will find your Access Key (something like 5ca1ab1e-d3ad-beef-dea1-deba7ab1ed0c). Keep it handy, as you will need it to authorize the agent against the backend.

Agent key