This is a simple Spring Boot App( students-app) uses MysQL database to store the students information. The goal of this project is how we can build and deploy Spring Boot and MySQL on Kubernetes cluster.
mvn clean install
or
mvn -Dmaven.test.skip=true clean install ## to skip the unit tests
Follow the instructions here: https://kubernetes.io/docs/tasks/tools/install-minikube/
Follow the instructions here: https://kubernetes.io/docs/tasks/tools/install-kubectl/
minikube start
You should run this command after running 'minikube start'
eval $(minikube docker-env)
echo -n 'admin123' | base64
echo -n 'testuser' | base64
echo -n 'testuser@123' | base64
Before running this command ensure you already build the jar that is available in your project /target folder
docker build -t students-app:1.0 .
docker pull mysql:5.6
cd to /kuberenetes folder
kubectl apply -f mysql-configmap.yml
kubectl apply -f mysql-admin-secrets.yml
kubectl apply -f mysql-users-secrets.yml
kubectl apply -f mysql-deployment.yml
kubectl apply -f student-deployment.yml
kubectl get pods
kubectl get configmaps
kubectl get secrets
kubectl get deployments
minikube dashboard
cd to /kuberenetes folder
kubectl delete -f .
minikube stop