Reputation: 1377
I am trying to do performance benchmark testing for the image pull performances for Azure kubernetes cluster, To do this,
imagePullPolicy
as Always
in kubernetes jobs yaml file, but still I observed that the image is pulled once per node, post that for further scheduled job runs on these nodes, the image is not pulled again from azure container resgistry repo, instead the cached image on respective node is being used.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)
imagePullPolicy
is set to Always
?Upvotes: 0
Views: 319
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