kuberise / kuberise.io

Apache License 2.0
14 stars 15 forks source link

Automate DNS Record Update #53

Open mojtabaimani opened 3 months ago

mojtabaimani commented 3 months ago

Automate DNS Record Update for Kuberise Deployment to EKS

Description:

Currently, the process of updating the CNAME DNS record in Cloudflare after deploying Kuberise to EKS is manual. This involves waiting for the deployment to complete, copying the DNS address of the load balancer, and then logging into Cloudflare to update the CNAME record for eks.kuberise.dev. We need to automate this process to streamline our deployment workflow.

Requirements:

  1. Set up External DNS for Kubernetes:

    • Install and configure External DNS in a EKS cluster to manage DNS records automatically.
    • Ensure External DNS is configured to use Cloudflare as the DNS provider.
  2. Permissions:

    • Ensure the Cloudflare API token has the necessary permissions to edit DNS records for the relevant zone.
  3. Service Annotation:

    • Annotate the Kuberise service with the appropriate DNS settings to inform External DNS about the desired hostname (*.eks.kuberise.dev).

Steps:

  1. **Add External DNS to the platform tools

    • add a new item in values.yaml and values-eks-example.yaml in app of apps:**
    • add a values.yaml in external-dns folder in values/eks-example folder to add Cloudflare provider settings.
  2. Annotate Kuberise Service:

    • Annotate the ingress-nginx loadbalancer service with the hostname *.eks.kuberise.dev.
  3. Deploy and Verify:

    • Deploy Kuberise and ensure External DNS updates the Cloudflare DNS records automatically.
  4. Monitoring and Testing:

    • Monitor the External DNS logs to verify it is working as expected.
    • Test the deployment to ensure the DNS record *.eks.kuberise.dev is updated correctly in Cloudflare.

Acceptance Criteria:

This automation will significantly reduce the manual overhead involved in the deployment process and ensure that DNS records are always up-to-date, improving our deployment efficiency and reliability.