Replace the TSIG key of an RFC2136 DNS credential by adding a second credential with the new key and moving the projects to it.
You cannot edit the TSIG fields of a saved credential, and you cannot delete a credential while a project still references it, even if DNS is disabled on that project. The error is "This credential is used by active projects". Rotation therefore needs a second credential. Because disabling DNS does not remove RFC2136 records, the names of the project are briefly unavailable during the switch.
- On the DNS server, add the new key next to the old one.
- In Cloudera Cloud Factory, add a second RFC2136 credential with the same Domain and the new key.
- For each project that uses the old credential, delete its Ingresses, Services, Gateway API routes, and DNSEndpoints, and wait about 2 minutes so that external-dns removes its records. Then disable DNS on the project.
- Enable DNS on the project again and select the new credential. Then recreate the sources of the project.
Through the API, you can also attach the new credential while DNS is off with POST /api/v1/dnscredentials/attach-project. The request is refused while external DNS is on.
- When no project uses the old credential, delete it, and then remove the old key from the server.