From 9d7db7fb030b3b54d8bd253dc09fbbf51425ac34 Mon Sep 17 00:00:00 2001 From: Cesar De la Torre Date: Wed, 14 Jun 2017 11:34:08 -0700 Subject: [PATCH] Updated 10. Setting the solution up in ACS Kubernetes (markdown) --- ...tting-the-solution-up-in-ACS-Kubernetes.md | 33 +++++++++++++++++-- 1 file changed, 31 insertions(+), 2 deletions(-) diff --git a/10.-Setting-the-solution-up-in-ACS-Kubernetes.md b/10.-Setting-the-solution-up-in-ACS-Kubernetes.md index 6b1ecf4..7a1341b 100644 --- a/10.-Setting-the-solution-up-in-ACS-Kubernetes.md +++ b/10.-Setting-the-solution-up-in-ACS-Kubernetes.md @@ -301,12 +301,41 @@ Finally you can test the web applications at the URLs told at the end of the scr You should be able to run the eShop MVC app like in the following screenshot (using your external IP for the cluster, of course) +## Issues when deploying to Kubernetes in ACS +Sometimes you might have an issue when deploying and some pods might have not be deployed right the first time. +You can check that out by reviewing the deployments in the Kubernetes dashboard. +If any of the pods had any issue, you might see like it has 0 (CERO) instances. +In that case, you can try to resume/restart that specific deployment by executing the following Kubernetes CLI command using KUBECTL, like any of the following: + +`kubectl rollout resume ` +`kubectl rollout resume deployments/webspa ` +`kubectl rollout resume deployments/frontend ` +`kubectl rollout resume deployments/catalog ` + +Then, check if the deployment was performed successfully by using the Kubernetes dashboard or by using the following command: + +`kubectl get deployments` ## Scaling out eShopOnContainers in Kubernetes -TBD +In order to explicitly scale out any specific service, you can also use KUBECTL. +For instance, let's say you want to scale out the NGINX frontend or the CATALOG service to 5 instances. You just need to run any of the following commands: + +`kubectl scale --replicas=5 deployments/frontend` +`kubectl scale --replicas=5 deployments/catalog ` + +### Autoscale +In case you'd like to scale out automatically based on certain node's state, youcan also scale out automatically with commands like: + +`kubectl autoscale deployment catalog --cpu-percent=60 --min=1 --max=8` + +In this case, you'd be targeting a 60% CPU percent and the system will scale automatically the needed instances in order to comply with that requirement. ## High Availability of eShopOnContainers in Kubernetes -TBD +In order to have High Availability of eShopOnContainers in Kubernetes you should move the "state" containers out of the cluster to HA services, like: + +- SQL Server container --> Azure SQL Database +- Redis container --> Redis PaaS service in Azure +- RabbitMQ container --> Change Event Bus implementation (like in eShopOnAzure repo) and use Azure Service Bus or any other Service Bus. ## Sending feedback and pull requests We'd appreciate to your feedback, improvements and ideas.