You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/aks/best-practices-app-cluster-reliability.md
+26-25Lines changed: 26 additions & 25 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,12 +3,12 @@ title: Deployment and cluster reliability best practices for Azure Kubernetes Se
3
3
titleSuffix: Azure Kubernetes Service
4
4
description: Learn the best practices for deployment and cluster reliability for Azure Kubernetes Service (AKS) workloads.
5
5
ms.topic: conceptual
6
-
ms.date: 02/05/2024
6
+
ms.date: 02/06/2024
7
7
---
8
8
9
9
# Deployment and cluster reliability best practices for Azure Kubernetes Service (AKS)
10
10
11
-
This article provides best practices for deployment and cluster reliability for Azure Kubernetes Service (AKS) workloads. The article is intended for cluster operators and developers who are responsible for deploying and managing applications in AKS.
11
+
This article provides best practices for cluster reliability implemented both at a deployment and cluster level for your Azure kubernetes Service (AKS) workloads. The article is intended for cluster operators and developers who are responsible for deploying and managing applications in AKS.
12
12
13
13
The best practices in this article are organized into the following categories:
14
14
@@ -22,7 +22,7 @@ The best practices in this article are organized into the following categories:
22
22
The following deployment level best practices help ensure high availability and reliability for your AKS workloads. These best practices are local configurations that you can implement in the YAML files for your pods and deployments.
23
23
24
24
> [!NOTE]
25
-
> Make sure you implement these best practices every time you deploy an update to your application.
25
+
> Make sure you implement these best practices every time you deploy an update to your application. If not, you might experience issues with your application's availability and reliability, such as unintentional application downtime.
26
26
27
27
### Pod Disruption Budgets (PDBs)
28
28
@@ -32,7 +32,7 @@ The following deployment level best practices help ensure high availability and
32
32
33
33
[Pod Disruption Budgets (PDBs)](https://kubernetes.io/docs/concepts/workloads/pods/disruptions/#pod-disruption-budgets) allow you to define how deployments or replica sets respond during voluntary disruptions, such as upgrade operations or accidental pod deletions. Using PDBs, you can define a minimum or maximum unavailable resource count.
34
34
35
-
For example, let's say you need to perform a cluster upgrade and already have a PDB defined. Before performing the cluster upgrade, the Kubernetes scheduler ensures that the minimum number of pods defined in the PDB are available. If the upgrade would cause the number of available pods to fall below the minimum defined in the PDS, the scheduler schedules extra pods on other nodes before allowing the upgrade to proceed. If you don't set a PDB, the scheduler doesn't have any constraints on the number of pods that can be unavailable during the upgrade, which can lead to a lack of resources and potential cluster outages.
35
+
For example, let's say you need to perform a cluster upgrade and already have a PDB defined. Before performing the cluster upgrade, the Kubernetes scheduler ensures that the minimum number of pods defined in the PDB are available. If the upgrade would cause the number of available pods to fall below the minimum defined in the PDBs, the scheduler schedules extra pods on other nodes before allowing the upgrade to proceed. If you don't set a PDB, the scheduler doesn't have any constraints on the number of pods that can be unavailable during the upgrade, which can lead to a lack of resources and potential cluster outages.
36
36
37
37
In the following example PDB definition file, the `minAvailable` field sets the minimum number of pods that must remain available during voluntary disruptions:
38
38
@@ -80,27 +80,28 @@ spec:
80
80
memory: 256Mi
81
81
```
82
82
83
-
You can use the `kubectl describe node` command to view the CPU and memory capacity of your nodes, as shown in the following example:
84
-
85
-
```bash
86
-
kubectl describe node <node-name>
87
-
88
-
# Example output
89
-
Capacity:
90
-
cpu: 8
91
-
ephemeral-storage: 129886128Ki
92
-
hugepages-1Gi: 0
93
-
hugepages-2Mi: 0
94
-
memory: 32863116Ki
95
-
pods: 110
96
-
Allocatable:
97
-
cpu: 7820m
98
-
ephemeral-storage: 119703055367
99
-
hugepages-1Gi: 0
100
-
hugepages-2Mi: 0
101
-
memory: 28362636Ki
102
-
pods: 110
103
-
```
83
+
> [!TIP]
84
+
> You can use the `kubectl describe node` command to view the CPU and memory capacity of your nodes, as shown in the following example:
85
+
>
86
+
> ```bash
87
+
> kubectl describe node <node-name>
88
+
>
89
+
> # Example output
90
+
> Capacity:
91
+
> cpu: 8
92
+
> ephemeral-storage: 129886128Ki
93
+
> hugepages-1Gi: 0
94
+
> hugepages-2Mi: 0
95
+
> memory: 32863116Ki
96
+
> pods: 110
97
+
> Allocatable:
98
+
> cpu: 7820m
99
+
> ephemeral-storage: 119703055367
100
+
> hugepages-1Gi: 0
101
+
> hugepages-2Mi: 0
102
+
> memory: 28362636Ki
103
+
> pods: 110
104
+
> ```
104
105
105
106
For more information, see [Assign CPU Resources to Containers and Pods](https://kubernetes.io/docs/tasks/configure-pod-container/assign-cpu-resource/) and [Assign Memory Resources to Containers and Pods](https://kubernetes.io/docs/tasks/configure-pod-container/assign-memory-resource/).
0 commit comments