6.3.5. About configuring parallel container image pulls


To help control bandwidth issues, you can configure the number of workload images that can be pulled at the same time.

By default, the cluster pulls images in parallel, which allows multiple workloads to pull images at the same time. Pulling multiple images in parallel can improve workload start-up time because workloads can pull needed images without waiting for each other. However, pulling too many images at the same time can use excessive network bandwidth and cause latency issues throughout your cluster.

The default setting allows unlimited simultaneous image pulls. But, you can configure the maximum number of images that can be pulled in parallel. You can also force serial image pulling, which means that only one image can be pulled at a time.

To control the number of images that can be pulled simultaneously, use a kubelet configuration to set the maxParallelImagePulls to specify a limit. Additional image pulls above this limit are held until one of the current pulls is complete.

To force serial image pulls, use a kubelet configuration to set serializeImagePulls field to true.

6.3.5.1. Configuring parallel container image pulls

You can control the number of images that can be pulled by your workload simultaneously by using a kubelet configuration. You can set a maximum number of images that can be pulled or force workloads to pull images one at a time.

Prerequisites

  • You have a running OpenShift Container Platform cluster.
  • You are logged in to the cluster as a user with administrative privileges.

Procedure

  1. Apply a custom label to the machine config pool where you want to configure parallel pulls by running a command similar to the following.

    $ oc label machineconfigpool <mcp_name> parallel-pulls=set
  2. Create a custom resource (CR) to configure parallel image pulling.

    apiVersion: machineconfiguration.openshift.io/v1
    kind: KubeletConfig
    metadata:
      name: parallel-image-pulls
    # ...
    spec:
      machineConfigPoolSelector:
        matchLabels:
          parallel-pulls: set
      kubeletConfig:
        serializeImagePulls: false
        maxParallelImagePulls: 3
    # ...

    where:

    serializeImagePulls
    Specifies whether parallel pulling is enabled for the nodes in the associated machine config pool. Set to false to enable parallel image pulls. Set to true to force serial image pulling. The default is false.
    maxParallelImagePulls
    Specifies the maximum number of images that can be pulled in parallel. Enter a number or set to nil to specify no limit. This field cannot be set if SerializeImagePulls is true. The default is nil.
  3. Create the new machine config by running a command similar to the following:

    $ oc create -f <file_name>.yaml

Verification

  1. Check the machine configs to see that a new one was added by running the following command:

    $ oc get MachineConfig
    NAME                                                GENERATEDBYCONTROLLER                        IGNITIONVERSION   AGE
    00-master                                           70025364a114fc3067b2e82ce47fdb0149630e4b     3.5.0             133m
    00-worker                                           70025364a114fc3067b2e82ce47fdb0149630e4b     3.5.0             133m
    # ...
    99-parallel-generated-kubelet                       70025364a114fc3067b2e82ce47fdb0149630e4b     3.5.0             15s
    # ...
    rendered-parallel-c634a80f644740974ceb40c054c79e50  70025364a114fc3067b2e82ce47fdb0149630e4b     3.5.0             10s

    where:

    99-parallel-generated-kubelet
    Specifies the new machine config. In this example, the machine config is for the parallel custom machine config pool.
    rendered-parallel-<sha_numnber>
    Specifies the new rendered machine config. In this example, the machine config is for the parallel custom machine config pool.
  2. Check to see that the nodes in the parallel machine config pool are being updated by running the following command:

    $ oc get machineconfigpool
    NAME       CONFIG                                               UPDATED   UPDATING   DEGRADED   MACHINECOUNT   READYMACHINECOUNT   UPDATEDMACHINECOUNT   DEGRADEDMACHINECOUNT   AGE
    parallel   rendered-parallel-3904f0e69130d125b3b5ef0e981b1ce1   False     True       False      1              0                   0                     0                      65m
    master     rendered-master-7536834c197384f3734c348c1d957c18     True      False      False      3              3                   3                     0                      140m
    worker     rendered-worker-c634a80f644740974ceb40c054c79e50     True      False      False      2              2                   2                     0                      140m
  3. When the nodes are updated, verify that the parallel pull maximum was configured:

    1. Open an oc debug session to a node by running a command similar to the following:

      $ oc debug node/<node_name>
    2. Set /host as the root directory within the debug shell by running the following command:

      sh-5.1# chroot /host
    3. Examine the kubelet.conf file by running the following command:

      sh-5.1# cat /etc/kubernetes/kubelet.conf | grep -i maxParallelImagePulls
      maxParallelImagePulls: 3
Red Hat logoGithubredditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 소개

Red Hat은 기업이 핵심 데이터 센터에서 네트워크 에지에 이르기까지 플랫폼과 환경 전반에서 더 쉽게 작업할 수 있도록 강화된 솔루션을 제공합니다.

보다 포괄적 수용을 위한 오픈 소스 용어 교체

Red Hat은 코드, 문서, 웹 속성에서 문제가 있는 언어를 교체하기 위해 최선을 다하고 있습니다. 자세한 내용은 다음을 참조하세요.Red Hat 블로그.

Red Hat 문서 정보

Legal Notice

Theme

© 2026 Red Hat
맨 위로 이동