zkt25/z2/prepare-app.sh
2025-04-02 08:39:41 +00:00

18 lines
403 B
Bash

#!/bin/bash
# Create the namespace
kubectl apply -f namespace.yaml
# Build the Docker image
docker build -t blog-app:latest .
# Ensure minikube uses the local image
eval $(minikube docker-env)
docker build -t blog-app:latest .
# Start Minikube if it's not already running
if ! minikube status | grep -q "Running"; then
minikube start
fi
echo "Preparation complete. You can now run ./start-app.sh"