Updated 10. Setting the solution up in ACS Kubernetes (markdown)
parent
de7ff3377e
commit
9d7db7fb03
@ -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)
|
You should be able to run the eShop MVC app like in the following screenshot (using your external IP for the cluster, of course)
|
||||||
<img src="img/kubernetes/eshop-mvc-web-running-on-kubernetes.png">
|
<img src="img/kubernetes/eshop-mvc-web-running-on-kubernetes.png">
|
||||||
|
|
||||||
|
## 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 <serviceName> `
|
||||||
|
`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
|
## 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
|
## 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
|
## Sending feedback and pull requests
|
||||||
We'd appreciate to your feedback, improvements and ideas.
|
We'd appreciate to your feedback, improvements and ideas.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user