Kubernetes RBAC 위에서 DataDog agent 돌리기

  • Post author:
  • Post category:칼럼
  • Post comments:0 Comments
  • Post last modified:March 10, 2020
This entry is part 11 of 12 in the series Cloud Security

추가 소식: 공식 문서를 쓰는 중이라고 한다.

Kubernetes의 Role-based Access Control 도입 후에 DataDog agent가 Kubernetes 이벤트를 수집하지 못하는 문제가 발생했다. Kubernetes 클러스터에 대한 접근권한을 확보해주어야 Kubernetes 이벤트를 수집할 수 있다는 건 자명하다. 다만 DataDog이 구체적으로 어떤 리소스에 접근하는지 알기 힘들어서 공식 문서를 뒤져보았다. 당연하지만 공식 문서에 잘 적어놨으면 이런 글을 쓰지 않았을 것이다. 공식 문서에는 RBAC가 없던 시절의 Kubernetes 배포 예제만 있다. 다행히 GitHub에 관련 문제를 논의한 티켓이 있다.

Openshift 3.3 – Agent (running as daemonset) throws supervisor/collection error · Issue #180 · DataDog/docker-dd-agent

Output of the info page ** The below commands were ran from one of the pods created by the Kubernetes Daemonset. $ oc rsh dd-agent-d2o5p # bash root@dd-agent-d2o5p:/# /etc/init.d/datadog-agent st…

Gist 링크 하나 던져주고 이슈를 닫았다. 이제 RBAC 쓰는 곳이 꽤 많을텐데 공식 문서에 친절하게 넣어주면 안 되려나? 아무튼 코드 스니펫 베껴서 살짝 손봤더니 전부 정상작동한다.

참, 물론 막강한 cluster-admin 권한을 부여하면 세밀함 따위 필요 없다. 하지만 그럴 생각이면 뭐하려 RBAC를 도입하나?

Author Details
Kubernetes, DevSecOps, AWS, 클라우드 보안, 클라우드 비용관리, SaaS 의 활용과 내재화 등 소프트웨어 개발 전반에 도움이 필요하다면 도움을 요청하세요. 지인이라면 가볍게 도와드리겠습니다. 전문적인 도움이 필요하다면 저의 현업에 방해가 되지 않는 선에서 협의가능합니다.
0 0 votes
Article Rating
Subscribe
Notify of
guest

This site uses Akismet to reduce spam. Learn how your comment data is processed.

0 Comments
Inline Feedbacks
View all comments