How to configure a default imagePullSecret for any deployment?

0 votes
How can I bind ImagePullSecret to a kubernetes-pod? Can somebody help me with this?
Jul 18 in Kubernetes by Sam
• 4,330 points
82 views

1 answer to this question.

0 votes

Hey @Sam, you can attach an image pull secret to a service account. 

Any pod using that uses service account (including default) can take advantage of the secret.

you can bind the pullSecret to your pod, but you’re still left with having to create the secret every time you make a namespace.

imagePullSecrets:

name: test

Also, you can  create the rc/deployment manually and either specify the imagepullsecret or a service account that has the secret or add the imagepullsecret to the default service account, in which case you'd be able to use `kubectl run` and not have to make any manual changes to the manifest. 

Depending on your environment and how secret this imagepullsecret is, will change how you approach it.

answered Jul 18 by Sirajul
• 40,980 points

Related Questions In Kubernetes

0 votes
1 answer

Can I configure my kubernetes job to run for a specified time?

When we create a job spec, we ...READ MORE

answered Jul 17 in Kubernetes by Sirajul
• 40,980 points
30 views
0 votes
1 answer

How to configure a Pod to use the updated configMap?

If the config map is mounted into ...READ MORE

answered Jul 18 in Kubernetes by Sirajul
• 40,980 points
39 views
0 votes
1 answer

Configure a Kubernetes-pod to use persistent volume for storage.

The output shows that the PersistentVolume has ...READ MORE

answered Jul 23 in Kubernetes by Sirajul
• 40,980 points
351 views
0 votes
1 answer
0 votes
3 answers

Error while joining cluster with node

Hi Kalgi after following above steps it ...READ MORE

answered Jan 17 in Others by anonymous
3,365 views
+3 votes
1 answer
0 votes
1 answer

How to determine what is the status of a deployment ?

You could use kubectl get deployment <deployment>.  If ...READ MORE

answered Jul 12 in Kubernetes by Sirajul
• 40,980 points
42 views
0 votes
1 answer

How to rollback a deployment?

Applying changes to a Deployment process with ...READ MORE

answered Jul 12 in Kubernetes by Sirajul
• 40,980 points
39 views