From 739993c69d24e8afcb162bcaeaef7597a4f6bb89 Mon Sep 17 00:00:00 2001 From: Omer Date: Fri, 26 Apr 2024 18:31:41 +0300 Subject: [PATCH] Added helm docs to ns1 --- docs/tutorials/ns1.md | 42 ++++++++++++++++++++++++++++++++++++++---- 1 file changed, 38 insertions(+), 4 deletions(-) diff --git a/docs/tutorials/ns1.md b/docs/tutorials/ns1.md index 71d9039cb4..572b7f2880 100644 --- a/docs/tutorials/ns1.md +++ b/docs/tutorials/ns1.md @@ -41,6 +41,34 @@ var `NS1_APIKEY` will be needed to run ExternalDNS with NS1. Connect your `kubectl` client to the cluster with which you want to test ExternalDNS, and then apply one of the following manifest files for deployment: +Begin by creating a Kubernetes secret to securely store your CloudFlare API key. This key will enable ExternalDNS to authenticate with CloudFlare: +```shell +kubectl create secret generic NS1_APIKEY --from-literal=NS1_API_KEY=YOUR_NS1_API_KEY +``` + +Ensure to replace YOUR_NS1_API_KEY with your actual NS1 API key. + +Then apply one of the following manifests file to deploy ExternalDNS. + +## Using Helm + +Create a values.yaml file to configure ExternalDNS to use CloudFlare as the DNS provider. This file should include the necessary environment variables: +```shell +provider: + name: ns1 +env: + - name: NS1_APIKEY + valueFrom: + secretKeyRef: + name: NS1_APIKEY + key: NS1_API_KEY +``` + +Finally, install the ExternalDNS chart with Helm using the configuration specified in your values.yaml file: +```shell +helm upgrade --install external-dns external-dns/external-dns --version 1.14.4 --values values.yaml +``` + ### Manifest (for clusters without RBAC enabled) ```yaml @@ -67,8 +95,11 @@ spec: - --domain-filter=example.com # (optional) limit to only example.com domains; change to match the zone created above. - --provider=ns1 env: - - name: NS1_APIKEY - value: "YOUR_NS1_API_KEY" + - name: NS1_APIKEY + valueFrom: + secretKeyRef: + name: NS1_APIKEY + key: NS1_API_KEY ``` ### Manifest (for clusters with RBAC enabled) @@ -131,8 +162,11 @@ spec: - --domain-filter=example.com # (optional) limit to only example.com domains; change to match the zone created above. - --provider=ns1 env: - - name: NS1_APIKEY - value: "YOUR_NS1_API_KEY" + - name: NS1_APIKEY + valueFrom: + secretKeyRef: + name: NS1_APIKEY + key: NS1_API_KEY ``` ## Deploying an Nginx Service