pbajpai
pbajpai

Reputation: 1377

ImagePullPolicy -Always not working on Azure/EKS kubernetes cluster

I am trying to do performance benchmark testing for the image pull performances for Azure kubernetes cluster, To do this,

Below is my jobs.yaml file which I used to create job:

apiVersion: batch/v1
kind: Job
metadata:
  name: image-pull-perf
  namespace: "test"
spec:
  template:
    spec:
      imagePullSecrets:
        - name: regcred
      containers:
        - name: spark
          image: test.azurecr.io/data/spark_2.4:v1
          imagePullPolicy: Always
      restartPolicy: Never
  backoffLimit: 4
  completions: 100
  parallelism: 100
  completionMode: "Indexed"
  ttlSecondsAfterFinished: 10

Questions : (I already tried to get my answers from searching on internet but didn't find the complete reasoning for this beahviour)

  1. Why the image is not always being pulled from repo when imagePullPolicy is set to Always ?
  2. If there is no change in the hash of docker image, in that case what happen when imagePullPolicy is set to Always, Will it try to pull again or use it from docker cache as there is no change in hash of image ?
  3. Can we disable the node level cache for docker images ?
  4. If somehow the Always pull policy doesn't work due to node level cache, in that case how can make the image to be pulled always for each job run ?
  5. Any suggestions on approach to do performance benchmarking for image pull/push from Azure/AWS container registries on kubernetes cluster (can be AKS or EKS) .

Upvotes: 0

Views: 319

Answers (1)

GProssliner
GProssliner

Reputation: 49

Do you see events hat a pull has been done?

You can check by: kubectl get events -A --field-selector=reason==Pulling

Upvotes: -1

Related Questions