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, 2019 in Kubernetes by Sam
• 6,260 points
1,735 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, 2019 by Sirajul
• 59,230 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, 2019 in Kubernetes by Sirajul
• 59,230 points
954 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, 2019 in Kubernetes by Sirajul
• 59,230 points
796 views
+1 vote
1 answer
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, 2019 in Kubernetes by Sirajul
• 59,230 points
2,537 views
+1 vote
1 answer
0 votes
3 answers

Error while joining cluster with node

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

answered Jan 17, 2019 in Others by anonymous
14,582 views
+4 votes
1 answer

Installing Web UI (Dashboard):kubernetes-dashboard on main Ubuntu 16.04.6 LTS (Xenial Xerus) server

Follow these steps: $ kubeadm reset $ kubeadm init ...READ MORE

answered Apr 12, 2019 in Kubernetes by Kalgi
• 52,360 points

reshown Apr 12, 2019 by Kalgi 6,060 views
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, 2019 in Kubernetes by Sirajul
• 59,230 points
470 views
0 votes
1 answer

How to rollback a deployment?

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

answered Jul 12, 2019 in Kubernetes by Sirajul
• 59,230 points
842 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP