35 lines
No EOL
881 B
Bash
Executable file
35 lines
No EOL
881 B
Bash
Executable file
#!/bin/bash
|
|
|
|
echo "Deploying n8n to k3s cluster..."
|
|
|
|
# Create namespace
|
|
kubectl apply -f namespace.yaml
|
|
|
|
# Deploy PostgreSQL
|
|
kubectl apply -f secret.yaml
|
|
kubectl apply -f postgres-pvc.yaml
|
|
kubectl apply -f postgres-deployment.yaml
|
|
|
|
# Wait for PostgreSQL to be ready
|
|
echo "Waiting for PostgreSQL to be ready..."
|
|
kubectl wait --for=condition=ready pod -l app=postgres -n n8n --timeout=300s
|
|
|
|
# Deploy n8n
|
|
kubectl apply -f n8n-pvc.yaml
|
|
kubectl apply -f n8n-deployment.yaml
|
|
|
|
# Wait for n8n to be ready
|
|
echo "Waiting for n8n to be ready..."
|
|
kubectl wait --for=condition=ready pod -l app=n8n -n n8n --timeout=300s
|
|
|
|
# Create ingress
|
|
kubectl apply -f ingress.yaml
|
|
|
|
echo "n8n deployment complete!"
|
|
echo ""
|
|
echo "Access n8n at: https://n8n.w5isp.com"
|
|
echo ""
|
|
echo "To check the deployment status:"
|
|
echo "kubectl get pods -n n8n"
|
|
echo "kubectl get svc -n n8n"
|
|
echo "kubectl get ingress -n n8n" |