Use envsubst to substitute environment variables in namespace.yaml before applying with kubectl

This commit is contained in:
2025-10-02 14:39:37 +08:00
parent 098e436815
commit 9095c303b1

View File

@@ -129,7 +129,7 @@ deploy_application() {
# Create namespace if it doesn't exist # Create namespace if it doesn't exist
echo "Creating namespace..." echo "Creating namespace..."
kubectl apply -f script/k8s/namespace.yaml envsubst < script/k8s/namespace.yaml | kubectl apply -f -
echo "" echo ""
# Create registry secret for pulling images # Create registry secret for pulling images