You are on page 1of 1

Deploy microservices

--------------------------------------------

gcloud config set project tuto-store-336708

gcloud config get-value project

gcloud container clusters create tuto-cluster --zone europe-west1-b --machine-type


n1-standard-4

gcloud container clusters get-credentials tuto-cluster --zone europe-west1-b

kubectl config view | grep namespace:

kubectl config set-context --current --namespace=store

kubectl create -f
https://raw.githubusercontent.com/coreos/prometheus-operator/master/bundle.yaml

./kubectl-apply.sh -f

kubectl delete --all deployments --namespace=store

kubectl delete --all pods --namespace=store

Enabling scalability 1 MS
--------------------------------

kubectl get svc -n store

kubectl delete service invoice

kubectl expose deployment/invoice --port 7000 --target-port 8082 --type


LoadBalancer -n store

kubectl autoscale deployment invoice --cpu-percent=60 --min=2 --max=5 -n store

You might also like