Skip to content

Assignment #04

Due Date

Section Due Date
Monday 06:00PM on 03/11/2019

Getting Help


Ask all your questions on Piazza. Assign assignment tag to your posts.

Assignment Weightage

Individual Assignment Weightage on Course Grade of this assignment is 15%.


Central Logging

Collect logs from all containers/pods running on Kubernetes cluster. Implement following:

  1. Run FluentD in a Daemonset to collect logs from all files and directories in /var/log/containers or from /var/log/pods. You can use this helm chart.
  2. Logs should be shipped to AWS CloudWatch.
  3. Add Kubernetes cluster metadata to each log message using this fluentd plugin.

Setup Monitoring Using Prometheus

  1. Install Prometheus and Grafana within your Kubernetes cluster.
  2. Add Prometheus as datasource for Grafana.
  3. Enable persistent storge for Grafana dashboards.
  4. Collect Kubernetes cluster metrics.
  5. Install Grafana dashboard for Kubernetes. Dashboard can be found here.

Add Instrumentation & Export Metrics to Prometheus

  1. Add a counter to each API in your application. Client libraries can be found here.
  2. Configure Prometheus to collect metrics from your application.
  3. Create a Grafana dashboard for your application.



Assignment will be considered late if commits are made to master and feature branch after due date.

  1. All work for this assignment must be done on assignment feature branch and merged to master when you are dev complete.
  2. All team member’s feature and master branches must be in-sync.

Grading Guidelines


Following guidelines are for information only. They are subject to change at the discretion of the instructor and TA.

  1. Students must demonstrate application logs from containers running in Kubernetes cluster in AWS CloudWatch.
    1. Requests students to scale down pods to 0 and then scale back up. Logs from these new containers should also be available in AWS CloudWatch.
  2. Students must demonstrate application and Kuberntes cluster metrics in prometheus.
    1. Make API requests against API endpoints and watch the count in Grafana metrics.
  3. Verify Prometheus and Grafana deployment. Persistance should be enabled for Grafana deployments.
  4. Verify fluentd daemon sets deployment.