Logo Managing Dns

Managing Dns

Cộng đồng
ancoleman
managing-dns

Manage DNS records, TTL strategies, and DNS-as-code automation for infrastructure. Use when configuring domain resolution, automating DNS from Kubernetes with external-dns, setting up DNS-based load balancing, or troubleshooting propagation issues across cloud providers (Route53, Cloud DNS, Azure DNS, Cloudflare).

Tổng quan

Nhà phát hànhancoleman
Kho mãai-design-components
Tên kỹ năngmanaging-dns
Sao
525
Bản fork
77
Tệp đi kèm
14
Giấy phépMIT
Liên kết
  • Hướng dẫn bằng Markdown

    Tệp SKILL.md được mô hình tải khi cần, nên chỉ tốn token khi có yêu cầu thực sự phù hợp.

  • Dùng được với mọi LLM

    Kỹ năng AI dùng hướng dẫn viết bằng Markdown thay vì mã dành riêng cho một nhà cung cấp, nên dùng được với GPT, Claude, Gemini, Grok hoặc mô hình cục bộ.

  • 14 tệp đi kèm

    Các tập lệnh, mẫu và tài liệu tham khảo mà mô hình có thể đọc khi làm việc. Các tệp chỉ cho phép đọc và không bao giờ được thực thi.

  • Mã nguồn mở

    Được ancoleman công bố trên GitHub. Hãy đọc các tệp nguồn trước khi cài đặt.

Cài đặt

Cài đặt kỹ năng AI Managing Dns trong TypingMind để dùng với bất kỳ LLM nào, hoặc thêm vào một tác nhân AI khác có thể đọc SKILL.md.

1

Cài đặt trong TypingMind

TypingMind cài đặt kỹ năng trực tiếp từ thư mục GitHub — đọc SKILL.md, đóng gói các tệp tài nguyên và lưu kết quả trên máy.

  1. Mở ứng dụng và vào Plugin → Kỹ năng.
  2. Chọn "Cài đặt từ GitHub".
  3. Dán URL của thư mục kỹ năng được hiển thị bên dưới rồi xác nhận.
    https://github.com/ancoleman/ai-design-components/tree/main/skills/managing-dns
  4. Bật kỹ năng trong từng cuộc trò chuyện mà bạn muốn sử dụng kỹ năng đó.
Plugin → Kỹ năng → Thêm kỹ năng → Từ URL GitHub, sau đó dán URL thư mục và nhấn Tiếp tục.
2

Cài đặt trong tác nhân AI khác

Bất kỳ tác nhân AI nào đọc được định dạng Agent Skills đều có thể dùng kỹ năng này — hãy sao chép thư mục vào thư mục kỹ năng của tác nhân AI đó.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/ancoleman/ai-design-components.git /tmp/ai-design-components
mkdir -p .claude/skills
cp -r /tmp/ai-design-components/skills/managing-dns .claude/skills/managing-dns
Khởi động lại Claude Code sau khi sao chép để ứng dụng nhận kỹ năng mới.

Sử dụng trong TypingMind

Bật Managing Dns trong bất kỳ cuộc trò chuyện nào trên TypingMind, mô hình sẽ tự xử lý phần còn lại. Tên và mô tả của kỹ năng nằm trong prompt hệ thống. Ngay khi có yêu cầu phù hợp, mô hình tự tải toàn bộ hướng dẫn — bạn không cần gọi thủ công và kỹ năng không tốn token cho đến khi thực sự được dùng.

Mô hình tự nạp Managing Dns ngay khi có yêu cầu phù hợp.

Dùng được với mọi mô hình AI

Kỹ năng AI là các hướng dẫn Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên bạn có thể dùng Managing Dns với cả những mô hình khác ngoài mô hình ban đầu. Chỉ cần cài đặt một lần trong TypingMind rồi dùng với GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama hoặc mô hình cục bộ do bạn tự chạy — tất cả đều dùng khóa API của riêng bạn.

  • Chỉ tải khi cần

    Prompt hệ thống chỉ chứa tên và mô tả. Hướng dẫn được tải khi có yêu cầu phù hợp đầu tiên, nên khi kỹ năng chưa được dùng, bạn không tốn token cho phần hướng dẫn.

  • Đổi mô hình ngay trong cuộc trò chuyện

    Vì kỹ năng là hướng dẫn chứ không phải mã, việc đổi mô hình không làm kỹ năng ngừng hoạt động — mô hình tiếp theo vẫn đọc cùng tệp SKILL.md.

Hướng dẫn của kỹ năng

Đây là nội dung SKILL.md mà mô hình tải. Hãy đọc trước khi cài đặt — kỹ năng là những hướng dẫn mà mô hình của bạn sẽ làm theo.

DNS Management

Configure and automate DNS records with proper TTL strategies, DNS-as-code patterns, and troubleshooting techniques.

Purpose

Guide DNS configuration for applications, infrastructure, and services with focus on:

  • Record type selection (A, AAAA, CNAME, MX, TXT, SRV, CAA)
  • TTL strategies for propagation and caching
  • DNS-as-code automation (external-dns, OctoDNS, DNSControl)
  • Cloud DNS services comparison and selection
  • DNS-based load balancing patterns
  • Troubleshooting tools and techniques

When to Use This Skill

Apply DNS management patterns when:

  • Setting up DNS for new applications or services
  • Automating DNS updates from Kubernetes workloads
  • Configuring DNS-based failover or load balancing
  • Troubleshooting DNS propagation or resolution issues
  • Migrating DNS between providers
  • Planning DNS changes with minimal downtime
  • Implementing GeoDNS for global users

Record Type Selection

Quick Reference

Address Resolution:

  • A Record: Map hostname to IPv4 address (example.com → 192.0.2.1)
  • AAAA Record: Map hostname to IPv6 address (example.com → 2001:db8::1)
  • CNAME Record: Alias to another domain (www.example.com → example.com)
    • Cannot use at zone apex (@)
    • Cannot coexist with other records at same name

Email Configuration:

  • MX Record: Direct email to mail servers with priority
  • TXT Record: Email authentication (SPF, DKIM, DMARC) and verification

Service Discovery:

  • SRV Record: Specify service location (protocol, priority, weight, port, target)

Delegation and Security:

  • NS Record: Delegate subdomain to different nameservers
  • CAA Record: Restrict which Certificate Authorities can issue certificates

Cloud-Specific:

  • ALIAS Record: Like CNAME but works at zone apex (Route53, Cloudflare)

Decision Tree

Need to point domain to:
├─ IPv4 Address? → A record
├─ IPv6 Address? → AAAA record
├─ Another Domain?
│  ├─ Zone apex (@) → ALIAS/ANAME or A record
│  └─ Subdomain → CNAME
├─ Mail Server? → MX record (with priority)
├─ Email Authentication? → TXT record (SPF/DKIM/DMARC)
├─ Service Discovery? → SRV record
├─ Domain Verification? → TXT record
├─ Certificate Control? → CAA record
└─ Subdomain Delegation? → NS record

For detailed record type examples and patterns, see references/record-types.md.

TTL Strategy

Standard TTL Values

By Change Frequency:

  • Stable records: 3600-86400s (1-24 hours) - NS, stable A/AAAA
  • Normal operation: 3600s (1 hour) - Standard websites, MX
  • Moderate changes: 300-1800s (5-30 min) - Development, A/B testing
  • Failover scenarios: 60-300s (1-5 min) - Critical records needing fast updates

Key Principle: Lower TTL = faster propagation but higher DNS query load

Pre-Change Process

When planning DNS changes:

T-48h: Lower TTL to 300s
T-24h: Verify TTL propagated globally
T-0h:  Make DNS change
T+1h:  Verify new records propagating
T+6h:  Confirm global propagation
T+24h: Raise TTL back to normal (3600s)

Propagation Formula: Max Time = Old TTL + New TTL + Query Time

Example: Changing a record with 3600s TTL takes up to 2 hours to fully propagate.

TTL by Use Case

Use CaseTTLRationale
Production (stable)3600sBalance speed and load
Before planned change300sFast propagation
Development/staging300-600sFrequent changes
DNS-based failover60-300sFast recovery
Mail servers3600sRarely change
NS records86400sVery stable

For detailed TTL scenarios and calculations, see references/ttl-strategies.md.

DNS-as-Code Tools

Tool Selection by Use Case

Kubernetes DNS Automation → external-dns

  • Annotation-based configuration on Services/Ingresses
  • Automatic sync to DNS providers (20+ supported)
  • No manual DNS updates required
  • See examples/external-dns/

Multi-Provider DNS Management → OctoDNS or DNSControl

  • Version control for DNS records
  • Sync configuration across multiple providers
  • Preview changes before applying
  • OctoDNS (Python/YAML) - See examples/octodns/
  • DNSControl (JavaScript) - See examples/dnscontrol/

Infrastructure-as-Code → Terraform

  • Manage DNS alongside cloud resources
  • Provider-specific resources (aws_route53_record, etc.)
  • See examples/terraform/

Tool Comparison

ToolLanguageBest ForKubernetesMulti-Provider
external-dnsGoK8s automation★★★★★★★★★
OctoDNSPython/YAMLVersion control★★★★★★★★
DNSControlJavaScriptComplex logic★★★★★★★
TerraformHCLIaC integration★★★★★★★

Quick Start: external-dns

yaml
# Kubernetes Service with DNS annotation
apiVersion: v1
kind: Service
metadata:
  name: app
  annotations:
    external-dns.alpha.kubernetes.io/hostname: app.example.com
    external-dns.alpha.kubernetes.io/ttl: "300"
spec:
  type: LoadBalancer
  ports:
    - port: 80

Deploy external-dns controller once, then all annotated Services/Ingresses automatically create DNS records.

For complete examples, see examples/external-dns/ and references/dns-as-code-comparison.md.

Cloud DNS Provider Selection

Provider Characteristics

AWS Route53

  • Best for AWS-heavy infrastructure
  • Advanced routing policies (weighted, latency, geolocation, failover)
  • Health checks with automatic failover
  • ALIAS records for AWS resources (ELB, CloudFront, S3)
  • Pricing: $0.50/month per zone + $0.40 per million queries

Google Cloud DNS

  • Best for GCP-native applications
  • Strong DNSSEC support with automatic key rotation
  • Private zones for VPC internal DNS
  • Split-horizon DNS (different internal/external records)
  • Pricing: $0.20/month per zone + $0.40 per million queries

Azure DNS

  • Best for Azure-native applications
  • Integration with Azure Traffic Manager
  • Azure Private DNS zones
  • Azure RBAC for access control
  • Pricing: $0.50/month per zone + $0.40 per million queries

Cloudflare

  • Best for multi-cloud or cloud-agnostic
  • Fastest DNS query times globally
  • Built-in DDoS protection
  • Free tier with unlimited queries
  • CDN integration
  • Pricing: Free tier, $20/month Pro, $200/month Business

Selection Decision Tree

Choose based on:
├─ AWS-heavy? → Route53
├─ GCP-native? → Cloud DNS
├─ Azure-native? → Azure DNS
├─ Multi-cloud? → Cloudflare or OctoDNS/DNSControl
├─ Need fastest global DNS? → Cloudflare
├─ Need DDoS protection? → Cloudflare
└─ Budget-conscious? → Cloudflare (free tier) or Cloud DNS (lowest zone cost)

For detailed provider comparisons and examples, see references/cloud-providers.md.

DNS-Based Load Balancing

GeoDNS (Geographic Routing)

Return different IP addresses based on client location to:

  • Reduce latency (route to nearest data center)
  • Comply with data residency requirements
  • Distribute load across regions

Example Pattern:

Client Location → DNS Response
├─ North America → 192.0.2.1 (US data center)
├─ Europe → 192.0.2.10 (EU data center)
└─ Default → CloudFront edge (global CDN)

Weighted Routing

Distribute traffic by percentage for:

  • Blue-green deployments
  • Canary releases (10% to new version)
  • A/B testing

Example Pattern:

DNS Responses:
├─ 90% → 192.0.2.1 (stable version)
└─ 10% → 192.0.2.2 (canary version)

Health Check-Based Failover

Automatically route traffic away from unhealthy endpoints.

Pattern:

Primary: 192.0.2.1 (health checked every 30s)
├─ Healthy → Return primary IP
└─ Unhealthy → Return secondary IP (192.0.2.2)

Failover time: ~2-3 minutes
= Health check failures (90s) + TTL expiration (60s)

For complete load balancing examples, see examples/load-balancing/.

Troubleshooting

Essential Commands

Check DNS Resolution:

bash
# Basic query
dig example.com

# Clean output (just IP)
dig example.com +short

# Query specific DNS server
dig @8.8.8.8 example.com
dig @1.1.1.1 example.com

# Trace resolution path
dig +trace example.com

Check TTL:

bash
dig example.com | grep -A1 "ANSWER SECTION"
# Look for TTL value (number before IN A)

Check Propagation:

bash
# Multiple resolvers
dig @8.8.8.8 example.com +short       # Google
dig @1.1.1.1 example.com +short       # Cloudflare
dig @208.67.222.222 example.com +short # OpenDNS

Flush Local DNS Cache:

bash
# macOS
sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder

# Windows
ipconfig /flushdns

# Linux
sudo systemd-resolve --flush-caches

Common Problems

Slow Propagation:

  • Check current TTL (old TTL must expire first)
  • Lower TTL 24-48 hours before changes
  • Use propagation checkers: whatsmydns.net, dnschecker.org

CNAME at Zone Apex:

  • Error: Cannot use CNAME at @ (zone apex)
  • Solution: Use ALIAS record (Route53, Cloudflare) or A record

external-dns Not Creating Records:

  • Verify annotation spelling: external-dns.alpha.kubernetes.io/hostname
  • Check domain filter matches: --domain-filter=example.com
  • Review external-dns logs for errors
  • Confirm provider credentials configured

For detailed troubleshooting, see references/troubleshooting.md.

Common Patterns

Pattern 1: Kubernetes DNS Automation

yaml
# Deploy external-dns (once per cluster)
helm install external-dns external-dns/external-dns \
  --set provider=aws \
  --set domainFilters[0]=example.com \
  --set policy=sync

# Then annotate Services
apiVersion: v1
kind: Service
metadata:
  annotations:
    external-dns.alpha.kubernetes.io/hostname: api.example.com
    external-dns.alpha.kubernetes.io/ttl: "300"
spec:
  type: LoadBalancer

Pattern 2: Multi-Provider Sync with OctoDNS

yaml
# octodns-config.yaml
providers:
  config:
    class: octodns.provider.yaml.YamlProvider
    directory: ./config
  route53:
    class: octodns_route53.Route53Provider
  cloudflare:
    class: octodns_cloudflare.CloudflareProvider

zones:
  example.com.:
    sources: [config]
    targets: [route53, cloudflare]

Pattern 3: DNS-Based Failover

hcl
# Route53 with health checks
resource "aws_route53_health_check" "primary" {
  fqdn              = "primary.example.com"
  port              = 443
  type              = "HTTPS"
  resource_path     = "/health"
  failure_threshold = 3
  request_interval  = 30
}

resource "aws_route53_record" "primary" {
  zone_id        = aws_route53_zone.main.zone_id
  name           = "api.example.com"
  type           = "A"
  ttl            = 60
  set_identifier = "primary"

  failover_routing_policy {
    type = "PRIMARY"
  }

  health_check_id = aws_route53_health_check.primary.id
  records         = ["192.0.2.1"]
}

resource "aws_route53_record" "secondary" {
  zone_id        = aws_route53_zone.main.zone_id
  name           = "api.example.com"
  type           = "A"
  ttl            = 60
  set_identifier = "secondary"

  failover_routing_policy {
    type = "SECONDARY"
  }

  records = ["192.0.2.2"]
}

Integration with Other Skills

infrastructure-as-code:

  • Manage DNS via Terraform/Pulumi alongside other resources
  • Zone configuration in IaC repositories

kubernetes-operations:

  • external-dns automates DNS for Kubernetes workloads
  • Ingress controller integration for automatic DNS

load-balancing-patterns:

  • DNS-based load balancing (GeoDNS, weighted routing)
  • Health checks and failover configurations

security-hardening:

  • DNSSEC for DNS integrity
  • CAA records for certificate authority control
  • DNS-based DDoS mitigation

secret-management:

  • Store DNS provider API credentials in vaults
  • Secure DDNS update mechanisms

Additional Resources

Reference Documentation:

  • references/record-types.md - Detailed record type guide with examples
  • references/ttl-strategies.md - TTL scenarios and propagation calculations
  • references/cloud-providers.md - Provider comparison and detailed features
  • references/troubleshooting.md - Common problems and solutions
  • references/dns-as-code-comparison.md - Tool comparison matrix

Examples:

  • examples/external-dns/ - Kubernetes DNS automation
  • examples/octodns/ - Multi-provider sync with YAML
  • examples/dnscontrol/ - Multi-provider with JavaScript DSL
  • examples/terraform/ - Cloud provider configurations
  • examples/load-balancing/ - GeoDNS and failover patterns

Scripts:

  • scripts/check-dns-propagation.sh - Verify propagation across resolvers
  • scripts/validate-dns-config.py - Validate DNS configuration
  • scripts/export-dns-records.sh - Export existing DNS records
  • scripts/calculate-ttl-propagation.py - Calculate propagation time

Quick Reference

Record Types Cheat Sheet

RecordPurposeExample
AIPv4 addressexample.com → 192.0.2.1
AAAAIPv6 addressexample.com → 2001:db8::1
CNAMEAlias to domainwww → example.com
MXMail server10 mail.example.com
TXTText/verification"v=spf1 include:_spf.google.com ~all"
SRVService location10 60 5060 sip.example.com
NSNameserver delegationns1.provider.com
CAACA authorization0 issue "letsencrypt.org"

TTL Cheat Sheet

ScenarioTTLWhy
Stable production3600sBalance speed/load
Before change300sFast propagation
Failover60-300sFast recovery
NS records86400sVery stable

Provider Cheat Sheet

ProviderBest ForKey Feature
Route53AWSAdvanced routing, health checks
Cloud DNSGCPDNSSEC, private zones
Azure DNSAzureTraffic Manager integration
CloudflareMulti-cloudFastest, DDoS protection, free tier

Tool Cheat Sheet

ToolUse When
external-dnsKubernetes DNS automation
OctoDNSMulti-provider, Python shop
DNSControlMulti-provider, JavaScript preference
TerraformManaging DNS with other infrastructure

Tệp đi kèm

Khi kỹ năng đã được tải, mô hình có thể đọc các tệp này nếu cần. Các tệp này chỉ dùng để đọc và không bao giờ được thực thi.

Câu hỏi thường gặp

Kỹ năng AI Managing Dns làm được gì?

Manage DNS records, TTL strategies, and DNS-as-code automation for infrastructure. Use when configuring domain resolution, automating DNS from Kubernetes with external-dns, setting up DNS-based load balancing, or troubleshooting propagation issues across cloud providers (Route53, Cloud DNS, Azure DNS, Cloudflare).

Vì sao nên dùng Managing Dns trên TypingMind?

Vì bạn chỉ cần cài một lần rồi dùng với bất kỳ mô hình nào. Managing Dns là nội dung Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên cùng một kỹ năng có thể chạy trên GPT-5, Claude, Gemini, Grok hoặc mô hình trên thiết bị — và bạn có thể đổi mô hình ngay trong cuộc trò chuyện mà kỹ năng vẫn hoạt động. TypingMind dùng khóa API riêng của bạn, nên bạn thanh toán trực tiếp cho nhà cung cấp thay vì trả phí thuê bao theo suất người dùng, đồng thời kỹ năng và các cuộc trò chuyện vẫn nằm trong bộ lưu trữ của bạn.

Làm thế nào để cài Managing Dns trong TypingMind?

Mở Plugin → Kỹ năng → Cài đặt từ GitHub trong TypingMind rồi dán https://github.com/ancoleman/ai-design-components/tree/main/skills/managing-dns. TypingMind đọc tệp SKILL.md, đóng gói các tệp đi kèm rồi cài đặt cả gói dưới dạng một kỹ năng mà bạn có thể bật cho từng cuộc trò chuyện.

Những mô hình AI nào có thể dùng Managing Dns?

Bất kỳ mô hình nào bạn kết nối trong TypingMind. Kỹ năng AI là các hướng dẫn bằng Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên GPT, Claude, Gemini, Grok và các mô hình chạy trên thiết bị đều có thể tải kỹ năng này khi có yêu cầu phù hợp.

Có thể dùng Managing Dns với bao nhiêu mô hình AI?

Bao nhiêu cũng được. Miễn là mô hình hỗ trợ kỹ năng, bạn có thể dùng Managing Dns với mô hình đó — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama và nhiều mô hình khác — tất cả đều trên TypingMind với khóa API riêng của bạn.

Kỹ năng AI Managing Dns có miễn phí không?

Có. Kỹ năng này được ancoleman phát hành trên GitHub theo giấy phép MIT. Bạn chỉ trả tiền cho nhà cung cấp AI của mình theo số token đã dùng.

Kỹ năng AI là gì?

Kỹ năng AI là một gói hướng dẫn có thể tái sử dụng, chỉ cho mô hình AI cách thực hiện một tác vụ cụ thể. Kỹ năng tuân theo định dạng mở Agent Skills: một tệp SKILL.md chứa tên và mô tả, cùng các tập lệnh, mẫu hoặc tệp tham khảo mà mô hình có thể cần. Mô hình chỉ đọc hướng dẫn khi yêu cầu của bạn phù hợp với kỹ năng, nên kỹ năng đã cài đặt không phát sinh chi phí cho đến khi được sử dụng.

Kỹ năng AI khác gì với plugin hoặc máy chủ MCP?

Plugin hoặc máy chủ MCP cung cấp các công cụ mới mà mô hình có thể gọi. Khi mô hình gọi một công cụ, mã của công cụ đó chạy ở đâu đó và trả về kết quả. Còn kỹ năng AI cung cấp kiến thức và quy trình: cách tiếp cận tác vụ, các bước cần thực hiện và những tiêu chí mà kết quả cần đáp ứng. Kỹ năng chỉ là nội dung Markdown, nên không cần máy chủ, khóa API hay môi trường thực thi và hoạt động với mọi mô hình.

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇