What is this integration?
Cloudflare provides globally distributed DNS, CDN, and edge services.What Monk manages
- DNS Zone and DNS Record
What the Agent can do and how to use it
- DNS Management: Create, update, and delete DNS zones and records (A, CNAME, MX, TXT, etc.)
- CDN Configuration: Set up page rules, caching, and content optimization
- SSL/TLS: Configure SSL certificates and security settings
- Firewall: Manage firewall rules and DDoS protection settings
- Load Balancing: Configure load balancers and health checks
- Workers: Deploy and manage serverless functions at the edge
- Analytics: Enable traffic analytics and performance monitoring
Auth
- Set cloudflare-api-token secret
Links
- Provider docs: https://developers.cloudflare.com/dns/
Getting Started
- Set Cloudflare API token as secret:
- Define a DNS record (save as cloudflare.yaml):
- Create/update:
Advanced Configuration Examples
DNS Zone Management
Page Rules for CDN Optimization
Firewall Rules
Troubleshooting
Common Issues
API token permission errors:- DNS changes can take up to 24 hours to propagate globally
- Use Cloudflare’s development mode for testing to bypass cache
Best Practices
- API Token Security: Use restricted API tokens with minimal required permissions
- Zone Organization: Group related DNS records in logical namespaces
- CDN Optimization: Use page rules to optimize caching for different content types
- Security First: Enable firewall rules and rate limiting for sensitive endpoints
- Monitoring: Enable Cloudflare Analytics to monitor traffic patterns
Integration with Other Services
Cloudflare works seamlessly with:- Monk Applications: Proxy traffic through Cloudflare’s global network
- Load Balancers: Distribute traffic across multiple origins
- CDNs: Combine with other CDNs for multi-layer caching
- Security Tools: Integrate with WAF and DDoS protection services
- Analytics: Feed traffic data into monitoring dashboards
Support & Resources
- Cloudflare Documentation: DNS API Reference
- API Documentation: Cloudflare API v4
- Community: Cloudflare Community
- Status Page: Cloudflare Status