Difficulty: medium
Estimated Time: 30 minutes

In this scenario we try to deploy a simple web interface in two layers:

  • The backend web servers, implemented using flask
  • Frontend reverse proxies implemented using nginx

It is important to use the word "try", because the application stack fails to deploy correctly. The nginx proxies are not able to start, and Kubernetes tries to reboot them several times until it desists marking the pod as CrashloopBackoff.

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?
  • Troubleshoot a deployment problem.
    • Microservices and containers need specific mechanism to troubleshoot this kind of error.
      • Pod dies in a fraction of a second
      • You don't have logs
      • You cannot just SSH and try to restart the process
      • Traditional troubleshooting is not feasible
    • You will learn how to debug and troubleshoot a container-oriented deployment
  • Reason about dependencies, deployment order and how services find each other in Kubernetes

Competencies required

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

Sysdig Monitor Lab 06: Advanced Kubernetes troubleshooting

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.

If you do not have have a Sysdig account, you can set one up by clicking Not a customer? Try for free and following the instructions. Refer to the first lab for further details.

Click on the "Sysdig" tab and log in the Sysdig Secure web UI. You can click the pop-out icon to open this in a new tab in your browser.

Alternatively you can point your browser at https://app.sysdigcloud.com.

After logging in, 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