core/scripts/04_install_external_dns.sh
Guillaume B.B. Van Hemmen 6bf8d75310 #0000 - Add scripts and configurations for Kubernetes cluster setup
This commit includes Helm-based installation scripts for MetalLB, Traefik, Cert-Manager, and External DNS, along with their necessary configurations. Updates to cert-manager YAML ensure production-ready naming and namespace adjustments. These changes aim to streamline the deployment and management of Kubernetes services with simplified automation.
2024-12-19 17:18:36 +01:00

26 lines
769 B
Bash

#!/bin/bash
set -ex
# Check if the Cloudflare API token is provided as an argument
if [ -z "$1" ]; then
echo "Error: Missing Cloudflare API token."
echo "Usage: $0 <Cloudflare-API-Token>"
echo "You must provide your Cloudflare API token as a parameter to run this script."
exit 1
fi
CLOUDFLARE_API_TOKEN=$1
# Add the Bitnami Helm repository
helm repo add bitnami https://charts.bitnami.com/bitnami
helm repo update
# Create the namespace for external DNS
kubectl create namespace external-dns
# Install the external-dns chart with the provided Cloudflare API token
helm install external-dns bitnami/external-dns --namespace external-dns \
--set provider=cloudflare \
--set cloudflare.apiToken="$CLOUDFLARE_API_TOKEN" \
--set txtOwnerId=external-dns