Run com.in28minutes.microservices.currencyconversionservice.CurrencyConversionServiceApplicationH2 as a Java Application.
{
"id": 10001,
"from": "USD",
"to": "INR",
"conversionMultiple": 65.00,
"environmentInfo": "NA"
}
jdbc:h2:mem:testdb as JDBC URLcreate table exchange_value
(
id bigint not null,
conversion_multiple decimal(19,2),
currency_from varchar(255),
currency_to varchar(255),
primary key (id)
)
docker container run --publish 8000:8000 atingupta2005/currency-exchange:0.0.1-SNAPSHOT
gcloud container clusters create example-cluster \
--zone us-central1-a \
--node-locations us-central1-a,us-central1-b,us-central1-f \
--num-nodes 2 --enable-autoscaling --min-nodes 1 --max-nodes 4
gcloud container clusters create [CLUSTER_NAME] --enable-vertical-pod-autoscaling --cluster-version=1.14.7
gcloud container clusters update [CLUSTER-NAME] --enable-vertical-pod-autoscaling
apiVersion: autoscaling.k8s.io/v1
kind: VerticalPodAutoscaler
metadata:
name: currency-exchange-vpa
spec:
targetRef:
apiVersion: "apps/v1"
kind: Deployment
name: currency-exchange
updatePolicy:
updateMode: "Off"
kubectl get vpa currency-exchange-vpa --output yaml
kubectl autoscale deployment currency-exchange-service --max=3 --min=1 --cpu-percent=50
docker pull atingupta2005/currency-exchange:latest