We will be deploying this in kubernetes cluster, so make sure kubernetes is install and cluster is ready
Down the customer service and create your own image, and change the image path here and push it to your own dockerhub account or keep the image locally.
Execute these statements
kubectl create secret generic mysql-root-pass --from-literal=password=root
kubectl create secret generic mysql-user-pass --from-literal=username=root --from-literal=password=root
kubectl create secret generic mysql-db-url --from-literal=database=customerdb
Run this command to create mysql DB container
kubectl apply -f mysql.yml
mysql.yml file is here
check whether pods/service/deploymeny are created with these command
kubectl get deploy
kubectl get svc
kubectl get pods
Run this command to create mysql DB container
kubectl apply -f customer.yml
customer.yml file is here
check whether pods/service/deploymeny are created with these command
kubectl get deploy
kubectl get svc
kubectl get pods
Exceute this commond to scale
kubectl scale --replicas=2 deployment/customer