18 lines
489 B
Bash
Executable File
18 lines
489 B
Bash
Executable File
#!/bin/bash
|
|
|
|
echo "🚀 Creating namespace 'webapp-ns'..."
|
|
kubectl create namespace webapp-ns
|
|
|
|
echo "📦 Deploying frontend app..."
|
|
kubectl apply -f deployment.yaml
|
|
kubectl apply -f service.yaml
|
|
|
|
echo "🧾 Creating ConfigMap with init-db.sql..."
|
|
kubectl create configmap db-init-script --from-file=init-db.sql=init-db.sql -n webapp-ns
|
|
|
|
echo "🗄️ Deploying database backend..."
|
|
kubectl apply -f statefulset.yaml
|
|
kubectl apply -f deployment-api.yaml
|
|
|
|
echo "✅ All resources created."
|