Skip to content

Commit a360640

Browse files
Merge pull request #4677 from Azure/raelg/kubelet-image-gc-thresholds
infra: lower kubelet image GC thresholds to 70/60
2 parents 6b5cac1 + 6353ade commit a360640

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

dev-infrastructure/modules/aks-cluster-base.bicep

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,8 @@ param dnsPrefix string = aksClusterName
8686
param systemOsDiskSizeGB int
8787
param userOsDiskSizeGB int
8888
param infraOsDiskSizeGB int
89+
param imageGcHighThreshold int = 70
90+
param imageGcLowThreshold int = 60
8991

9092
@description('The resource IDs of ACR instances that the AKS cluster will pull images from')
9193
param pullAcrResourceIds array = []
@@ -308,6 +310,10 @@ resource aksCluster 'Microsoft.ContainerService/managedClusters@2025-07-02-previ
308310
enableFIPS: true
309311
enableNodePublicIP: false
310312
kubeletDiskType: 'OS'
313+
kubeletConfig: {
314+
imageGcHighThreshold: imageGcHighThreshold
315+
imageGcLowThreshold: imageGcLowThreshold
316+
}
311317
osDiskType: 'Ephemeral'
312318
osDiskSizeGB: systemOsDiskSizeGB
313319
minCount: systemAgentMinCount

dev-infrastructure/modules/aks/pool.bicep

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ param vmSize string
1313
param minCount int
1414
param maxCount int
1515
param osDiskSizeGB int
16+
param imageGcHighThreshold int = 70
17+
param imageGcLowThreshold int = 60
1618

1719
param vnetSubnetId string
1820
param podSubnetId string
@@ -94,6 +96,10 @@ resource userAgentPools 'Microsoft.ContainerService/managedClusters/agentPools@2
9496
enableFIPS: true
9597
enableNodePublicIP: false
9698
kubeletDiskType: 'OS'
99+
kubeletConfig: {
100+
imageGcHighThreshold: imageGcHighThreshold
101+
imageGcLowThreshold: imageGcLowThreshold
102+
}
97103
osDiskType: 'Ephemeral'
98104
osDiskSizeGB: osDiskSizeGB
99105
count: minCount

0 commit comments

Comments
 (0)