upd bash files
This commit is contained in:
parent
8af8d1ceab
commit
31d49d2fcb
@ -1,8 +1,8 @@
|
||||
#!/bin/bash
|
||||
echo "Building Docker image for backend..."
|
||||
echo "Building Docker image for backend"
|
||||
docker build -t battleship-backend ./backend
|
||||
|
||||
echo "Building Docker image for frontend..."
|
||||
echo "Building Docker image for frontend"
|
||||
docker build -t battleship-frontend ./frontend
|
||||
|
||||
echo "Docker images built."
|
||||
|
@ -1,14 +1,14 @@
|
||||
#!/bin/bash
|
||||
echo "Deleting Services for MySQL, backend, and frontend..."
|
||||
echo "Deleting Services for MySQL, backend, and frontend"
|
||||
kubectl delete -f service.yaml -n battleship-app
|
||||
|
||||
echo "Deleting StatefulSet for MySQL..."
|
||||
echo "Deleting StatefulSet for MySQL"
|
||||
kubectl delete -f statefulset.yaml -n battleship-app
|
||||
|
||||
echo "Deleting Deployments for backend and frontend..."
|
||||
echo "Deleting Deployments for backend and frontend"
|
||||
kubectl delete -f deployment.yaml -n battleship-app
|
||||
|
||||
echo "Deleting namespace battleship-app (and all objects within it)..."
|
||||
echo "Deleting namespace battleship-app"
|
||||
kubectl delete -f namespace.yaml
|
||||
|
||||
echo "Application completely removed from Kubernetes."
|
||||
|
@ -1,14 +1,14 @@
|
||||
#!/bin/bash
|
||||
echo "Creating namespace battleship-app..."
|
||||
echo "Creating namespace battleship-app"
|
||||
kubectl apply -f namespace.yaml
|
||||
|
||||
echo "Creating Deployment for backend and frontend..."
|
||||
echo "Creating Deployment for backend and frontend"
|
||||
kubectl apply -f deployment.yaml -n battleship-app
|
||||
|
||||
echo "Creating StatefulSet for MySQL..."
|
||||
echo "Creating StatefulSet for MySQL"
|
||||
kubectl apply -f statefulset.yaml -n battleship-app
|
||||
|
||||
echo "Creating Service for MySQL, backend, and frontend..."
|
||||
echo "Creating Service for MySQL, backend, and frontend"
|
||||
kubectl apply -f service.yaml -n battleship-app
|
||||
|
||||
echo "Application deployed in Kubernetes."
|
||||
|
@ -1,13 +1,13 @@
|
||||
#!/bin/bash
|
||||
echo "Stopping the application by scaling down to 0 replicas..."
|
||||
echo "Stopping the application by scaling down to 0 replicas"
|
||||
|
||||
echo "Scaling down the Deployment for backend to 0..."
|
||||
echo "Scaling down the Deployment for backend to 0"
|
||||
kubectl scale deployment battleship-backend -n battleship-app --replicas=0
|
||||
|
||||
echo "Scaling down the Deployment for frontend to 0..."
|
||||
echo "Scaling down the Deployment for frontend to 0"
|
||||
kubectl scale deployment battleship-frontend -n battleship-app --replicas=0
|
||||
|
||||
echo "Scaling down the StatefulSet for MySQL to 0..."
|
||||
echo "Scaling down the StatefulSet for MySQL to 0"
|
||||
kubectl scale statefulset battleship-mysql -n battleship-app --replicas=0
|
||||
|
||||
echo "Application stopped, data (e.g., database) is preserved."
|
||||
echo "Application stopped, data is preserved."
|
||||
|
Loading…
Reference in New Issue
Block a user