PaaS/모니터링·로깅

DataDog kubernetes 배포 시작하기

armyost 2023. 11. 13. 22:49
728x90

가트너 기준 모니터링 1위... 

그리고 막상 모니터링을 운영하다보면, 이거따로 저거따로 모니터링하는것도 한계가 있다. 보통 운영팀의 니즈는 돈을 들이더라도 하나의 대시보드에 띄워서 보고자 한다. 

 

생각보다 상용도 많이쓰고, 근데 아직 국내에 Datadog 쓰는데를 못본것 같다. 

 

DataDog을 Free trial로 실습한 내용을 공유한다.


우선 회원가입후에 내 API KEY 와 APP KEY를 알아야 한다. 

 

[내 프로필] - [Personal Settings]

 

[ Application Keys] 에서 'New Key' 를 클릭하여 APP KEY를 만든다. 잘 복사해놓자.

 

 

 

[내 프로필] - [Organization Settings] 

 

 

[API Keys] 에서 API KEY를 복사해두자


API/APP KEY를 복사해둔 다음 다음 매뉴얼을 따른다.

 

https://docs.datadoghq.com/ko/containers/kubernetes/installation/?tab=helm

 

쿠버네티스에 Datadog 에이전트 설치하기

Datadog, the leading service for cloud-scale monitoring.

docs.datadoghq.com

이때 YAML파일 하나 만드는게 매우 중요한다. 필자의 경우 다음과 같이 만들었다.

 

가이드에서도 링크되어 있는 values.yaml 의 내용에서 다음을 바꾸어야 한다.

https://github.com/DataDog/helm-charts/blob/main/charts/datadog/values.yaml

 

  
  ...
  
  ## ref: https://app.datadoghq.com/account/settings#agent/kubernetes
  apiKey: ##여기 내 API KEY를 쓰자##

  # datadog.apiKeyExistingSecret -- Use existing Secret which stores API key instead of creating a new one. The value should be set with the `api-key` key inside the secret.

  ## If set, this parameter takes precedence over "apiKey".
  #apiKeyExistingSecret:  ##주석을 해주자##
  
  ...
  
  ## If you are using clusterAgent.metricsProvider.enabled = true, you must set
  ## a Datadog application key for read access to your metrics.
  appKey:  ##내 APP KEY를 쓰자##

  # datadog.appKeyExistingSecret -- Use existing Secret which stores APP key instead of creating a new one. The value should be set with the `app-key` key inside the secret.

  ## If set, this parameter takes precedence over "appKey".
  #appKeyExistingSecret:  ##주석를 해주자##
  
  ...
  
  ## https://cloud.google.com/kubernetes-engine/docs/reference/rest/v1beta1/projects.locations.clusters#Cluster.FIELDS.name
  clusterName:  ##내 K8S CLUSTER 이름을 쓰자##
  
  ...
  
  site:  datadoghq.com ##주석을 해제하자##
  
  ...
  
  # clusterAgent.image.tag -- Cluster Agent image tag to use
  tag: 7.49.0 → 7.39.2 ##버전을 내리자###

  ...

  # agents.image.tag -- Define the Agent version to use
  tag: 7.49.0 → 7.39.2 ##버전을 내리자###

  ...

  # clusterChecksRunner.image.tag -- Define the Agent version to use
  tag: 7.49.0 → 7.39.2 ##버전을 내리자###
  
  ...
  
  # datadog.kubelet.tlsVerify -- Toggle kubelet TLS verification
  # @default -- true
  tlsVerify:  true ##true로 바꾸자##
    
  ...
    
  ## ref: https://docs.datadoghq.com/agent/basic_agent_usage/kubernetes/#log-collection-setup
  containerCollectAll: true ##true로 바꾸자##

 

이 후에 helm으로 install 하면 정상배포 된다.