|
| 1 | +--- |
| 2 | +title: Scale to zero nodes for Service Fabric managed clusters |
| 3 | +description: Learn how to scale your Service Fabric managed clusters to zero nodes for cost saving during downtime. |
| 4 | +ms.topic: how-to |
| 5 | +ms.author: tomcassidy |
| 6 | +author: tomvcassidy |
| 7 | +ms.service: service-fabric |
| 8 | +services: service-fabric |
| 9 | +ms.date: 05/24/2024 |
| 10 | +--- |
| 11 | + |
| 12 | +# Scale to zero nodes for Service Fabric managed clusters |
| 13 | + |
| 14 | +The scale to zero feature allows customers to create clusters that have one or more node types with zero nodes. Customers who have test clusters that do not need nodes on an ongoing basis will benefit from lower cost by scaling down to zero. Also, customers who wish to prep their cluster with all necessary configuration before adding nodes will benefit from scale to zero. |
| 15 | + |
| 16 | +## Limitations |
| 17 | + |
| 18 | +* Scaling to zero only works for Service Fabric API version `2024-06-01 preview or later`. |
| 19 | +* Scaling to zero only work for **secondary node types**. |
| 20 | + |
| 21 | +## Scale to zero in your ARM template |
| 22 | + |
| 23 | +You can modify the `vmInstanceCount` property to scale your managed cluster to zero nodes: |
| 24 | + |
| 25 | +```json |
| 26 | +{ |
| 27 | + "apiVersion": "2024-06-01-preview", |
| 28 | + "type": "Microsoft.ServiceFabric/managedclusters/nodetypes", |
| 29 | + "name": "[concat(parameters('clusterName'), '/', parameters('nodeTypeName'))]", |
| 30 | + "location": "[parameters('clusterLocation')]", |
| 31 | + "dependsOn": [ |
| 32 | + "[concat('Microsoft.ServiceFabric/managedclusters/', parameters('clusterName'))]" |
| 33 | + ], |
| 34 | + "properties": { |
| 35 | + "isPrimary": false, |
| 36 | + "dataDiskSizeGB": "[parameters('dataDiskSizeGB')]", |
| 37 | + "vmImagePublisher": "[parameters('vmImagePublisher')]", |
| 38 | + "vmImageOffer": "[parameters('vmImageOffer')]", |
| 39 | + "vmImageSku": "[parameters('vmImageSku')]", |
| 40 | + "vmImageVersion": "[parameters('vmImageVersion')]", |
| 41 | + "vmSize": "[parameters('vmSize')]", |
| 42 | + "vmInstanceCount": 0 |
| 43 | + } |
| 44 | +} |
| 45 | +``` |
| 46 | + |
| 47 | +## Next steps |
| 48 | + |
| 49 | +* [Customize your Service Fabric managed cluster configuration](how-to-managed-cluster-configuration.md) |
| 50 | +* [Configure autoscaling on your Service Fabric managed cluster](how-to-managed-cluster-autoscale.md) |
0 commit comments