gcloud container clusters create ecommerce-app --num-nodes 2 --enable-basic-auth --issue-client-certificate --zone europe-west1-b
2. Then create a docker image of order-service using gcloud build and push it to google container repository using following command
cd ./orderservice
gcloud builds submit --tag gcr.io/kuberenetes-01-basic/order-service .
3. Then create a docker image of payment-service using gcloud build and push it to google container repository using following command
cd ./paymentservice
gcloud builds submit --tag gcr.io/kuberenetes-01-basic/payment-service .
4. Then create a docker image of shipping-service using gcloud build and push it to google container repository using following command
cd ./shippingservice
gcloud builds submit --tag gcr.io/kuberenetes-01-basic/shipping-service .
5. Now all the docker images are pushed to google container repository. Now we can deploy the redis first
kubectl -f redis.yaml
Verify deployments using
kubectl get deployments
kubectl get services
kubectl -f orderservice.yaml
kubectl -f paymentservice.yaml
kubectl -f shippingservice.yaml
7. Now once the service is running, open the postman http://<external_ip_order_service>/orders/initiated and use the POST. In the body add the following json
{
"order": {
"id": "Order-121",
"desc": "ABC"
}
}
gcloud container clusters delete ecommerce-app