All Projects → GoogleCloudPlatform → gke-datadog-demo

GoogleCloudPlatform / gke-datadog-demo

Licence: Apache-2.0 license
This project demonstrates how a third party solution, like Datadog, can be used to monitor a Kubernetes Engine cluster and its workloads. Using the provided manifest, you will install Datadog and a simple nginx workload into your cluster. The Datadog agents will be configured to monitor the nginx workload, and ship metrics to your own Datadog ac…

Programming Languages

shell
77523 projects
python
139335 projects - #7 most used programming language
HCL
1544 projects
Makefile
30231 projects

Projects that are alternatives of or similar to gke-datadog-demo

gke-ip-address-management
An application to help with IP Address Management (IPAM) for Google Kubernetes Engine (GKE) clusters. Easily allows the calculation of the subnets required to spin up GKE clusters in VPC-native mode. See it at: https://googlecloudplatform.github.io/gke-ip-address-management/
Stars: ✭ 45 (+114.29%)
Mutual labels:  gke, kubernetes-engine, gke-helmsman
gke-vault-demo
This demo builds two GKE Clusters and guides you through using secrets in Vault, using Kubernetes authentication from within a pod to login to Vault, and fetching short-lived Google Service Account credentials on-demand from Vault within a pod.
Stars: ✭ 63 (+200%)
Mutual labels:  gke, kubernetes-engine, gke-helmsman
gke-istio-telemetry-demo
This project demonstrates how to use an Istio service mesh in a single Kubernetes Engine cluster alongside Prometheus, Jaeger, and Grafana, to monitor cluster and workload performance metrics. You will first deploy the Istio control plane, data plane, and additional visibility tools using the provided scripts, then explore the collected metrics …
Stars: ✭ 55 (+161.9%)
Mutual labels:  gke, kubernetes-engine, gke-helmsman
gke-rbac-demo
This project covers two use cases for RBAC within a Kubernetes Engine cluster. First, assigning different permissions to user personas. Second, granting limited API access to an application running within your cluster. Since RBAC's flexibility can occasionally result in complex rules, you will also perform common steps for troubleshooting RBAC a…
Stars: ✭ 138 (+557.14%)
Mutual labels:  gke, kubernetes-engine, gke-helmsman
gke-istio-gce-demo
In this project, you will leverage Kubernetes Engine and Google Compute Engine to explore how Istio can manage services that reside outside of the Kubernetes Engine environment. You will deploy a typical Istio service mesh in Kubernetes Engine, then configure an externally deployed microservice to join the mesh.
Stars: ✭ 53 (+152.38%)
Mutual labels:  gke, kubernetes-engine, gke-helmsman
gke-logging-sinks-demo
This project describes the steps required to deploy a sample application to Kubernetes Engine that forwards log events to Stackdriver Logging. As a part of the exercise, you will create a Cloud Storage bucket and a BigQuery dataset for exporting log data.
Stars: ✭ 45 (+114.29%)
Mutual labels:  gke, kubernetes-engine, gke-helmsman
gke-managed-certificates-demo
GKE ingress with GCP managed certificates
Stars: ✭ 21 (+0%)
Mutual labels:  gke, gke-helmsman
gke-anthos-holistic-demo
This repository guides you through deploying a private GKE cluster and provides a base platform for hands-on exploration of several GKE related topics which leverage or integrate with that infrastructure. After completing the exercises in all topic areas, you will have a deeper understanding of several core components of GKE and GCP as configure…
Stars: ✭ 55 (+161.9%)
Mutual labels:  gke, gke-helmsman
inspec-gke-cis-benchmark
GKE CIS 1.1.0 Benchmark InSpec Profile
Stars: ✭ 27 (+28.57%)
Mutual labels:  gke
Professional Services
Common solutions and tools developed by Google Cloud's Professional Services team
Stars: ✭ 1,923 (+9057.14%)
Mutual labels:  gke
terraform-google-kubernetes-istio
Creates a kubernetes cluster with istio enabled on GKE
Stars: ✭ 27 (+28.57%)
Mutual labels:  gke
build-your-own-platform-with-knative
Knativeのコンポーネントを理解しながらFaaSプラットフォームをDIYするワークショップです
Stars: ✭ 43 (+104.76%)
Mutual labels:  gke
nominatim-k8s
Nominatim for Kubernetes on Google Container Engine (GKE).
Stars: ✭ 59 (+180.95%)
Mutual labels:  gke
pixie
Instant Kubernetes-Native Application Observability
Stars: ✭ 3,238 (+15319.05%)
Mutual labels:  gke
build-a-platform-with-krm
Build a platform with the Kubernetes resource model!
Stars: ✭ 55 (+161.9%)
Mutual labels:  gke
osrm-backend-k8s
Open Source Routing Machine (OSRM) osrm-backend for Kubernetes on Google Container Engine (GKE).
Stars: ✭ 34 (+61.9%)
Mutual labels:  gke
Microservices Demo
Sample cloud-native application with 10 microservices showcasing Kubernetes, Istio, gRPC and OpenCensus.
Stars: ✭ 11,369 (+54038.1%)
Mutual labels:  gke
gitops-playground
Reproducible infrastructure to showcase GitOps workflows and evaluate different GitOps Operators on Kubernetes
Stars: ✭ 77 (+266.67%)
Mutual labels:  gke
kuberbs
K8s deployment rollback system based on system observability principles of modern stacks
Stars: ✭ 61 (+190.48%)
Mutual labels:  gke
terraform-google-kubernetes-cluster
GKE Kubernetes cluster with node pool submodule
Stars: ✭ 13 (-38.1%)
Mutual labels:  gke

Kubernetes Engine Datadog Monitoring POC

Table of Contents

Introduction

A common goal of cloud computing is to abstract away operational tasks from applications so that developer efforts can be focused on providing business value. One feature common to most applications is the need to monitor application and hardware metrics. On Google Cloud Platform (GCP) the Stackdriver suite of products addresses the need for monitoring and alerting. Some companies may already have a third party solution, however, and this project demonstrates configuring the use of Datadog in a Kubernetes Engine environment. We show you how to collect nginx metrics and pipe them to your existing Datadog account.

This demo contains a simple deployment script for Kubernetes Engine using personal accounts and Terraform. There is one manifest that deploys the Datadog agents and nginx.

NOTE: Personal account should never be used in a CI/CD pipeline. Provision a service account with all permissions needed to run this when automated.

Architecture

There is a single Kubernetes Engine cluster with 2 nodes. The datadog-agent.yaml manifest creates a DaemonSet that runs the Datadog agent on each node in the cluster. Alongside the Datadog agents are nginx processes that feed metrics to Datadog.

Prerequisites

Run Demo in a Google Cloud Shell

Click the button below to run the demo in a Google Cloud Shell.

Open in Cloud Shell

All the tools for the demo are installed. When using Cloud Shell execute the following command in order to setup gcloud cli. When executing this command please setup your region and zone.

gcloud init

Run Demo in a SSH Terminal

Tools

  1. Terraform >= 0.12.3
  2. Google Cloud SDK version >= 253.0.0
  3. kubectl matching the latest GKE version
  4. Apache Bench

The specific versions used may not be absolutely required but if you run into issues this may help.

Install Cloud SDK

The Google Cloud SDK is used to interact with your GCP resources. Installation instructions for multiple platforms are available online.

Install kubectl CLI

The kubectl CLI is used to interteract with both Kubernetes Engine and kubernetes in general. Installation instructions for multiple platforms are available online.

Install Terraform

Terraform is used to automate the manipulation of cloud infrastructure. Its installation instructions are also available online.

Install Apache Bench

For many users this won't be necessary as many operating systems have Apache Bench pre-installed. However it is contained within the apache2-utils package for Ubuntu/Debian users, and the httpd-tools package for CentOS/Redhat users.

Configure Authentication

Use gcloud auth login <[email protected]> --no-launch-browser to get a link to log in your gcloud cli to your personal account.

Deployment

Set up Datadog

  1. Create a free account on Datadog or use an existing one.
  2. Login to the DatadogHQ site and go to Agent Installation to display the text for the Datadog agent Kubernetes manifest. Scroll down until you see DD_API_KEY. Copy the value and paste it into manifests/datadog-agent.yaml at the same key.
  3. In DatadogHQ site go to "Integrations" -> Type "nginx" in the search bar -> Click on the "NGINX" Tile -> "Configuration" Tab -> "Install Integration" -- NGINX dashboards will now be available in the "Dashboards List"

Set up Kubernetes Engine Cluster Using Terraform and Deploy Services

 make create

Validation

  1. Log into your Datadog account.
  2. Go to the Dashboards page.
  3. You will see two pre-built Nginx dashboards that contain metrics for the nginx containers.
  4. Click on NGINX - Metrics.
  5. From a terminal execute EXT_IP=http://$(kubectl get svc nginx -n default -ojsonpath='{.status.loadBalancer.ingress[0].ip}/'); echo $EXT_IP. - If it displays a valid url with an IP address the service is deployed and ready to use. You can access the provided address in a browser to verify that nginx is handling requests.
  6. Run ab -n 1000 $EXT_IP - This will run a load test against nginx and generate metrics that will be forwarded to Datadog.
  7. In a few moments you should see data coming into your Datadog dashboard.

Tear Down

Run cd terraform to get back to the Terraform directory and run terraform destroy to remove all resources created by this demo.

Troubleshooting

** No data is displaying in Datadog **

  • Make sure you grabbed the DD_API_KEY value from the generated datadog-agent.yaml from the Datadog site. It is generated for you for your specific account.

** Terraform fails due to issues with zone or project **

  • Make sure your gcloud config has values for core/project and compute/zone.
gcloud config set core/project <YOUR PROJECT>
gcloud config set compute/zone <THE ZONE YOU WANT>

** The install script fails with a Permission denied when running Terraform **

  • The credentials that Terraform is using do not provide the necessary permissions to create resources in the selected projects. Ensure that the account listed in gcloud config list has necessary permissions to create resources. If it does, regenerate the application default credentials using gcloud auth application-default login.

Relevant Material

You can find additional information at the following locations

This is not an officially supported Google product

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].