Pre-requisites :
- Deploy Google Cloud SQL Server
- Create database and insert data (can check sql_script.sql file)
- Whitelist your local public ip address
- Install docker
- Install kubectl
- Install minikube
minikube start
minikube status
minikube service list
kubectl get nodes
eval $(minikube docker-env) # For change environment of docker on minikube
minikube addons enable heapster; minikube addons enable ingress
docker build -t online-book-store .
kubectl apply -f app-deployment.yaml
kubectl apply -f app-service.yaml
kubectl apply -f app-ingress.yaml
kubectl port-forward service/online-book-store-service 3000:3000 # to make accessible from your browser
kubectl get pods
kubectl logs online-book-store-2-768cf6f99f-d4kgl
kubectl exec -it online-book-store-2-cb944c756-66zgp -- /bin/sh
kubectl get pods online-book-store-2-cb944c756-66zgp -o jsonpath='{.spec.containers[*].name}'
kubectl delete pods --all -n default
kubectl delete pods -l app=online-book-store
docker run -it --rm online-book-store /bin/sh
Setting Up Google Cloud SQL Login Page Main Page Main Page for Search Button