DC/OS scaling of clusters on Azure - azure

I've installed DC/OS via the Azure Container Service (ACS), but I can't find any information anywhere on how to either scale this manually (just increase the number of agents), or ideally automatically in response to load.

There are a number of ways you can scale an ACS cluster:
CLI: https://blogs.msdn.microsoft.com/azurelinux/2016/07/20/azure-cli-0-10-2-release-update-5th-july-2016/
ACS resource provider: simply resubmit your ARM template for ACS with a new number of agents.
VMSS: use the portal to configure the scale set (including autoscale) https://azure.microsoft.com/en-us/documentation/articles/virtual-machine-scale-sets-autoscale-overview/

Related

Vertical scaling of azure kubernetes cluster

I am unable to scale vertical my AKS cluster.
Currently, I have 3 nodes in my cluster with 2 core and 8 ram, I am trying to upgrade it with 16 code and 64 RAM, how do I do it?
I tried scaling the VM scale set, on Azure portal it shows it is scaled but when I do "kubectl get nodes -o wide" it still shows the old version.
Any leads will be helpful.
Thanks,
Abhishek
Vertical scaling or changing the node pool VM size is not supported. You need to create a new node pool and schedule your pods on the new nodes.
https://github.com/Azure/AKS/issues/1556#issuecomment-615390245
this UX issues is due to how the VMSS is managed by AKS. Since AKS is
a managed service, we don't support operations done outside of the AKS
API to the infrastructure resources. In this example you are using the
VMSS portal to resize, which uses VMSS APIs to resize the resource and
as a result has unexpected changes.
AKS nodepools don't support resize in place, so the supported way to
do this is to create a new nodepool with a new target and delete the
previous one. This needs to be done through the AKS portal UX. This
maintains the goal state of the AKS node pool, as at the moment the
portal is showing the VMSize AKS knows you have because that is what
was originally requested.

Azure AKS: Control which node should be removed while downscaling

I have an AKS-Cluster in Azure. When I scale down the cluster with az aks scale for example I want to control which Node should be removed.
I cannot find a documentation that describes how Azure decides.
Will Azure prefer removing nodes that are already cordoned or drained?
Deleting it from the Azure Portal is not an option, because I want an application to communicate with Azure via CLI or API.
First of all, it's impossible to control which node to remove when you scale down the AKS cluster. Then I will show you how do the nodes change when you scale the AKS cluster.
When you do not use the VMSS as the agent pool, it means the AKS cluster use the individual VMs as the nodes. If you scale up, then it will increase the nodes with the index after the existing nodes. For example, the cluster has one node with the index 0 and then it will use the index 1 if you scale up one node. And if you scale down, it will remove the nodes with the biggest index in the sequence at first.
When you use the VMSS as the agent pool, it will comply with the scale rules of VMSS. And you can see the VMSS scale rules in the changes of VMSS scale up and down.
Also, you can take a look at the Azure CLI command az aks scale that scale the AKS cluster and the REST API.

Azure Auto Scaling

Is there an equivalent functionality in Azure like AWS Auto Scaling Group or GCP Instance Group? All I can find is Azure Virtual Machine Scale Set which always uses load balancer. The closest resource I found is Azure Automation Runbook which a bit more complex for my use case.
I just need to spin up virtual machines based on current vm's health threshold and/or to use it for vertical scaling by simply change the instance type.
You can create an Azure VMSS without a loadbalancer, you may need to assign a pubic IP addresses to your VM which is now available. In your case it sounds like you just want 1 node in the VMSS so you can use AutoScale.
https://learn.microsoft.com/en-us/azure/virtual-machine-scale-sets/virtual-machine-scale-sets-networking#public-ipv4-per-virtual-machine
The equivalent Azure service for AWS Auto Scaling Group or GCP Instance Group is Azure Autoscale.
I'll provide some basic overview on Azure's Autoscale taken from here.
Azure Autoscale supports the most common scaling scenarios based on a
schedule and, optionally, triggered scaling operations based on
runtime metrics (such as processor utilization, queue length, or
built-in and custom counters). You can configure simple autoscaling
policies for a solution quickly and easily by using the Azure portal.
For more detailed control, you can make use of the Azure Service
Management REST API or the Azure Resource Manager REST API. The Azure
Monitoring Service Management Library and the Microsoft Insights
Library (in preview) are SDKs that allow collecting metrics from
different resources, and perform autoscaling by making use of the REST
APIs. For resources where Azure Resource Manager support isn't
available, or if you are using Azure Cloud Services, the Service
Management REST API can be used for autoscaling. In all other cases,
use Azure Resource Manager.
The mentioned article is a great resource.
It also provides information about:
Types of scaling (Vertical Vs Horizontal).
Configure autoscaling for an Azure solution.
How to use Azure Autoscale.
Application design considerations for implementing autoscaling.
Check out also this resource on How to auto scale a cloud service.

Azure Container Service DCOS fails to deploy due to QuotaExceeded

I am trying to deploy Azure Container Service with DCOS orchestrator, 1 master, 1 agent, with Standard D2_v2 agent size (2 cores), West Europe, using Azure portal. I am passing validation at the end of the process, but when I click 'OK' for deployment I get error:
"QuotaExceeded\",\r\n \"message\": \"Operation results in exceeding quota limits of Core. Maximum allowed: 4, Current in use: 0, Additional requested: 6."
Why does service requires 6 cores when I am trying to use D2_v2 agent size that requires only 2 cores?
Here are the pictures with configuration and error:
https://imgur.com/a/js8T9
I tried doing the same with azure CLI as in this guide and got the same error.
Edit: I am using free trial service version.
When we try to use Azure marketplace to deploy ACS DC/OS, Azure will create one master and two nodes, at least we need 6 cores.
But free trial subscription with a limit of 4 cores.
As a workaround, we can deploy DC/OS without use Azure marketplace, we can create two VMs and deploy DC/OS on those VMs, one master and one node.
More information about deploy DC/OS on VMs, please refer to this article.
Because you are deploying a cluster, meaning several nodes linked together. In this case 3 nodes. You need to use other region or request additional cores for this region (use support ticket).

Logging/Monitoring of Kubernetes cluster in Azure Contianer Service

Does Azure Container Service integrate with Azure Monitor?
Wondering what the best way is to do logging/monitoring of kubernetes cluster?
If you are looking for monitoring tools on Azure, you may want to use Azure OMS (Opertation Management Suite). This gives you the ability to monitor the container inventory, performance, and logs in a single location. To my understanding, the stats of the container is only available for Linux nodes now, if you are deploying your k8s cluster on the Azure Portal.
To do this, you need to first create an OMS account. By this time, you should have the Workspace ID and the key available. The next step would
be to create the oms pod on each node using a DaemonSet.
For the detailed setup, take a look at https://learn.microsoft.com/en-us/azure/container-service/kubernetes/container-service-kubernetes-oms.
For third party tools, Grafana+influxdb is one of the ways I have tried before. Basically it provides you with the metrics on two levels: POD and NODE respectively. The displayed metrics included CPU Usage, Memory Usage, Network Usage and Filesystem Usage, etc. Of course, you can always alter your query to add extra metrics.
For the implementation of this approach, you can refer to https://github.com/Azure/acs-engine/blob/master/docs/kubernetes/monitoring.md.
Hope this helps :)
you can use this CLI command to browse through kubernetes cluster deployed using azure container service.
az acs kubernetes browse -g -n
This way you can see kubernetes webui
also you can use kubectl proxy command.

Resources