본문으로 건너뛰기
50% 할인 모든 플랜, 기간 한정. 시작 가격 $2.48/mo
CoreDNS

CoreDNS

CoreDNS는 플러그인을 사슬처럼 연결하는 DNS 서버입니다. 파일, etcd, 쿠버네티스에서 존을 제공하고 캐싱과 함께 전달하며, Corefile에 한 줄만 추가하면 DNS-over-TLS나 프로메테우스 메트릭을 붙일 수 있습니다. Apache-2.0 라이선스, GitHub 스타 14,200개 이상.

한눈에 보기

14.3k

GitHub 스타

1

페이지 조회수

라이선스 Apache-2.0 버전 Latest OS Ubuntu Server 24.04 LTS Min RAM 1 GB IP IPV4,IPV6

서비스 관리

CoreDNS 상태를 확인합니다:

systemctl status coredns

CoreDNS 재시작:

systemctl restart coredns

CoreDNS 리로드:

systemctl reload coredns

CoreDNS 중지:

systemctl stop coredns

CoreDNS 시작:

systemctl start coredns

CoreDNS 로그 보기:

journalctl -u coredns -f

DNS 구성

CoreDNS의 기본 구성은 다음과 같습니다:

/etc/coredns/Corefile

기본 구성은 DNS 쿼리를 다음으로 전달합니다:

1.1.1.1 8.8.8.8

Corefile은 구체적인 요구 사항과 사용 사례에 맞게 구성하세요.

Corefile을 변경한 후 CoreDNS를 재시작합니다:

systemctl restart coredns

DNS 엔드포인트

  • DNS: 53/tcp53/udp
  • 헬스: http://127.0.0.1:8080/health
  • 준비 상태: http://127.0.0.1:8181/ready
  • 메트릭: http://127.0.0.1:9153/metrics

중요한 파일 및 디렉토리

  • 바이너리: /usr/bin/coredns
  • Corefile: /etc/coredns/Corefile
  • 서비스: /etc/systemd/system/coredns.service
  • Sysusers: /usr/lib/sysusers.d/coredns.conf
  • Tmpfiles: /usr/lib/tmpfiles.d/coredns.conf
  • Logrotate: /etc/logrotate.d/coredns
  • 데이터 디렉토리: /var/lib/coredns
  • 로그 파일: /var/log/coredns.log
  • 오류 로그: /var/log/coredns.err.log
  • 리졸버 재정의: /etc/systemd/resolved.conf.d/99-coredns.conf

DNS 확인 테스트

CoreDNS에 직접 조회합니다:

dig @127.0.0.1 example.com

또는 서버 IP로 조회합니다:

dig @<SERVER-IP> example.com

The host's /etc/resolv.conf is configured to use:

nameserver 127.0.0.1

참고

  • CoreDNS uses systemd-resolved 53번 포트를 비우기 위한 구성 변경을 수행합니다.
  • The host resolver is pointed to 127.0.0.1.
  • DNS 쿼리는 구성된 상위 리졸버로 전달됩니다.
  • CoreDNS runs under the dedicated coredns system user.

네트워킹의 더 보기

관련 앱.

지금 CoreDNS를 배포하세요. 월 $2.48부터.