Configuration Reference

May 12, 2026 · View on GitHub

Command-Line Flags

FlagEnv VariableDefaultDescription
--credential-modestaticstatic (SecretId/SecretKey) or oidc (TKE RRSA)
--config-fileJSON config file (compatible with in-tree --tencent-cloud-config-file)
--regionTENCENTCLOUD_REGIONTencent Cloud region (e.g., ap-guangzhou)
--secret-idTENCENTCLOUD_SECRET_IDAPI SecretId (static mode only)
--secret-keyTENCENTCLOUD_SECRET_KEYAPI SecretKey (static mode only)
--zone-typepublicpublic (DNSPod) or private (PrivateDNS). See public-private-zones for managing both.
--vpc-idVPC ID (required for --zone-type=private)
--domain-filterLimit to specific domains (repeatable, optional — omit to manage all)
--zone-id-filterLimit to specific zone IDs (repeatable, private only)
--dry-runfalseLog changes without applying
--internet-endpointtrueUse public API endpoint (false for VPC internal)
--api-rate9API rate limit per second
--provider-portlocalhost:8888Webhook API listen address
--health-port:8080Health check listen address
--log-levelinfodebug, info, warn, error

Credential Resolution Order

Static mode (default)

Priority: flag → env → config file

  1. --secret-id / --secret-key
  2. TENCENTCLOUD_SECRET_ID / TENCENTCLOUD_SECRET_KEY
  3. --config-file (JSON with secretId / secretKey fields)

OIDC mode

No static keys needed. Reads from env vars injected by pod-identity-webhook:

  • TKE_ROLE_ARN
  • TKE_REGION
  • TKE_PROVIDER_ID
  • TKE_WEB_IDENTITY_TOKEN_FILE

Config File Format

Compatible with the former in-tree provider's --tencent-cloud-config-file:

{
  "regionId": "ap-guangzhou",
  "secretId": "AKIDxxxxxxxx",
  "secretKey": "xxxxxxxx",
  "vpcId": "vpc-xxxxxxxx",
  "internetEndpoint": true
}

All fields are optional — flags and env vars override config file values.

Required Permissions

ServiceActions
DNSPod (public)dnspod:DescribeDomainList, dnspod:DescribeRecordList, dnspod:CreateRecord, dnspod:DeleteRecord, dnspod:ModifyRecord
PrivateDNS (private)privatedns:DescribePrivateZoneList, privatedns:DescribePrivateZoneRecordList, privatedns:CreatePrivateZoneRecord, privatedns:DeletePrivateZoneRecord, privatedns:ModifyPrivateZoneRecord

Internal API Endpoint

Set --internet-endpoint=false for workloads inside Tencent Cloud VPC. Uses *.internal.tencentcloudapi.com endpoints, avoiding public network traffic.

Webhook API

EndpointMethodDescription
/GETNegotiate — returns DomainFilter
/recordsGETList current DNS records
/recordsPOSTApply changes (create/update/delete)
/adjustendpointsPOSTAdjust endpoints (pass-through)
/healthzGETHealth check

Content-Type: application/external.dns.webhook+json;version=1