Skip to content

Commit 69cae38

Browse files
authored
Merge pull request #8045 from zalando-incubator/set-image-pull-qps
introduce config-items to control kubelet image qps
2 parents a53b85b + 66b2788 commit 69cae38

File tree

3 files changed

+21
-1
lines changed

3 files changed

+21
-1
lines changed

cluster/config-defaults.yaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -787,6 +787,22 @@ ebs_csi_controller_sidecar_cpu: "10m"
787787
# pull images in parallel
788788
serialize_image_pulls: "false"
789789

790+
# rate of image pull in the kubelet, see
791+
# see https://github.com/kubernetes/kubernetes/blob/v1.30.0/staging/src/k8s.io/kubelet/config/v1beta1/types.go#L200-L212
792+
#
793+
# registryPullQPS is the limit of registry pulls per second.
794+
# The value must not be a negative number.
795+
# Setting it to 0 means no limit.
796+
# Default: 5
797+
kubelet_registry_pull_qps : "20"
798+
799+
# registryBurst is the maximum size of bursty pulls, temporarily allows
800+
# pulls to burst to this number, while still not exceeding registryPullQPS.
801+
# The value must not be a negative number.
802+
# Only used if registryPullQPS is greater than 0.
803+
# Default: 10
804+
kubelet_registry_burst: "40"
805+
790806
# Version of the scheduler or controller-manager used by the master nodes.
791807
# Supported values:
792808
# - upstream: official Kubernetes version

cluster/node-pools/master-default/userdata.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ write_files:
1717
- owner: root:root
1818
path: /etc/kubernetes/config/kubelet.yaml.template
1919
content: |
20-
# https://github.com/kubernetes/kubernetes/blob/v1.13.6/staging/src/k8s.io/kubelet/config/v1beta1/types.go
20+
# https://github.com/kubernetes/kubernetes/blob/v1.30.0/staging/src/k8s.io/kubelet/config/v1beta1/types.go
2121
apiVersion: kubelet.config.k8s.io/v1beta1
2222
kind: KubeletConfiguration
2323
cgroupDriver: systemd
@@ -35,6 +35,8 @@ write_files:
3535
{{- if ne .Cluster.ConfigItems.serialize_image_pulls "true" }}
3636
serializeImagePulls: false
3737
{{- end }}
38+
registryPullQPS: {{ .Cluster.ConfigItems.kubelet_registry_pull_qps }}
39+
registryBurst: {{ .Cluster.ConfigItems.kubelet_registry_burst }}
3840
healthzPort: 10248
3941
healthzBindAddress: "0.0.0.0"
4042
tlsCertFile: "/etc/kubernetes/ssl/worker.pem"

cluster/node-pools/worker-splitaz/userdata.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,8 @@ write_files:
7777
{{- if ne .Cluster.ConfigItems.serialize_image_pulls "true" }}
7878
serializeImagePulls: false
7979
{{- end }}
80+
registryPullQPS: {{ .Cluster.ConfigItems.kubelet_registry_pull_qps }}
81+
registryBurst: {{ .Cluster.ConfigItems.kubelet_registry_burst }}
8082
healthzPort: 10248
8183
healthzBindAddress: "0.0.0.0"
8284
tlsCertFile: "/etc/kubernetes/ssl/worker.pem"

0 commit comments

Comments
 (0)