Code Monkey home page Code Monkey logo

datadogcontainerexample's Introduction

DatadogContainerExample

Information on application

  • Runtime & Version: .NET 6
  • OS: Debian

Datadog Agent Setup steps:

Create secrets for the Datadog Agent. The values can be found within your Datadog instance.

kubectl create secret generic datadog-agent --from-literal api-key=<DD_API_KEY> --from-literal app-key=<DD_APP_KEY>

Install the Datadog Linux Agent via Helm Install Helm

curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 \ chmod 700 get_helm.sh \ ./get_helm.sh

Create a new file called values.yaml& within the new file set the following:

datadog:
 clusterName: <CLUSTER-NAME>
 apiKeyExistingSecret: datadog-agent
 apm:
  portEnabled: true
logs:
  enabled: true
  containerCollectAll: true
processAgent:
  processCollection: true
dogstatsd:
  useHostPort: true
kubeStateMetricsCore:
  enabled: true
kubeStateMetricsEnabled: false
kubelet:
  tlsVerify: false
networkMonitoring:
  enabled: true
securityAgent:
  compliance:
    enabled: true
  runtime:
    enabled: true
    syscallMonitor:
      enabled: true
agents:
# This toleration allows the agent to be deployed to every node.
tolerations:
  - operator: Exists

Add the Datadog Helm repository:

helm repo add datadog https://helm.datadoghq.com

Fetch the latest version of the newly added charts:

helm repo update 

Create the namespace

kubectl create namespace <NAMESPACE>
Example: kubectl create namespace datadog-agent

Deploy the Datadog Agent

helm install <RELEASE_NAME> -n <NAMESPACE> -f datadog-values.yaml --set datadog.site='datadoghq.com' datadog/datadog

Verify that the Datadog Agent pods are running by the following command:

kubectl get pods --namespace <NAMESPACE>
Example: kubectl get pods --namespace datadog-agent

Deploy the .NET application

The Datadog .NET APM Library must be installed in the application container (i.e. Dockerfile) in order to bind the the application process. Please reference the Dockerfile in this GH repository to see how that is done.

Deploy the application pod

kubeclt create -f <APPLICATION_YAML>
Example: kubectl create -f dotnet_app.yaml

Deploy the application service (for the LoadBalancer)

kubeclt create -f <APPLICATION_YAML>
Example: kubectl create -f dotnet_app_service.yaml

Verify the application pod is running:

kubectl get po | grep dotnet

Troubleshooting

If you are updating the applicaiton manifest with a newer version:

kubectl delete -f dotnet_app.yaml 
kubectl create -f dotnet_app.yaml 

Check the Load Balancer external IP:

kubectl get svc 

To check the ContainerPort and HostPort:

kubectl describe pod <POD_NAME>
Example: kubectl describe pod dotnetapp-55f55dbbft-74cnf

datadogcontainerexample's People

Contributors

jaycdave88 avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.