https://github.com/kuldeepsingh99/hazelcast-embeded
Spring boot My SQL with Hazelcast Embedded Cache in kubernetes
https://github.com/kuldeepsingh99/hazelcast-embeded
caching caching-sql hazelcast hazelcast-client hazelcast-cluster hazelcast-spring microservice mysql spring-boot
Last synced: 3 months ago
JSON representation
Spring boot My SQL with Hazelcast Embedded Cache in kubernetes
- Host: GitHub
- URL: https://github.com/kuldeepsingh99/hazelcast-embeded
- Owner: kuldeepsingh99
- Created: 2020-06-11T16:38:28.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2020-06-24T04:53:38.000Z (almost 5 years ago)
- Last Synced: 2023-12-03T22:22:06.342Z (over 1 year ago)
- Topics: caching, caching-sql, hazelcast, hazelcast-client, hazelcast-cluster, hazelcast-spring, microservice, mysql, spring-boot
- Language: Java
- Homepage:
- Size: 22.5 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# hazelcast embeded cache with Spring boot and Mysql
## Prerequisite
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](https://github.com/kuldeepsingh99/hazelcast-embeded/blob/master/deployment/customer.yml#L19) and push it to your own dockerhub account or keep the image locally.
## Step 1 ( Creating secrets)
Execute these statements
```
kubectl create secret generic mysql-root-pass --from-literal=password=rootkubectl 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
```## Step 2 (Deploying mysql DB)
Run this command to create mysql DB container
```
kubectl apply -f mysql.yml
```mysql.yml file is [here](https://github.com/kuldeepsingh99/hazelcast-embeded/blob/master/deployment/mysql.yml)
check whether pods/service/deploymeny are created with these command
```
kubectl get deploy
kubectl get svc
kubectl get pods
```## Step 3 (Deploying customer service)
Run this command to create mysql DB container
```
kubectl apply -f customer.yml
```customer.yml file is [here](https://github.com/kuldeepsingh99/hazelcast-embeded/blob/master/deployment/customer.yml)
check whether pods/service/deploymeny are created with these command
```
kubectl get deploy
kubectl get svc
kubectl get pods
```## Scaling Customer Service
Exceute this commond to scale
```
kubectl scale --replicas=2 deployment/customer
```