Add CoreDNS configuration and update setup script; remove split-horizon config
This commit is contained in:
@@ -16,14 +16,8 @@ echo "Current directory: $(pwd)"
|
||||
|
||||
# Apply the custom config for the k3s-provided CoreDNS
|
||||
echo "Applying CoreDNS configuration..."
|
||||
echo "Looking for file: ${SCRIPT_DIR}/coredns/coredns-config.yaml"
|
||||
# Simply use envsubst for variable expansion and apply
|
||||
cat "${SCRIPT_DIR}/coredns/coredns-config.yaml" | envsubst | kubectl apply -f -
|
||||
|
||||
# Apply the split-horizon configuration
|
||||
echo "Applying split-horizon DNS configuration..."
|
||||
cat "${SCRIPT_DIR}/coredns/split-horizon.yaml" | envsubst | kubectl apply -f -
|
||||
|
||||
# Apply the LoadBalancer service for external access to CoreDNS
|
||||
echo "Applying CoreDNS service configuration..."
|
||||
cat "${SCRIPT_DIR}/coredns/coredns-service.yaml" | envsubst | kubectl apply -f -
|
||||
@@ -32,4 +26,4 @@ cat "${SCRIPT_DIR}/coredns/coredns-service.yaml" | envsubst | kubectl apply -f -
|
||||
echo "Restarting CoreDNS pods to apply changes..."
|
||||
kubectl delete pod -n kube-system -l k8s-app=kube-dns
|
||||
|
||||
echo "CoreDNS setup complete!"
|
||||
echo "CoreDNS setup complete!"
|
||||
|
Reference in New Issue
Block a user