Turn Your Vehicle Into a Smart Earning Asset

While you’re not driving your car or bike, it can still be working for you. MOTOSHARE helps you earn passive income by connecting your vehicle with trusted renters in your city.

🚗 You set the rental price
🔐 Secure bookings with verified renters
📍 Track your vehicle with GPS integration
💰 Start earning within 48 hours

Join as a Partner Today

It’s simple, safe, and rewarding. Your vehicle. Your rules. Your earnings.

Kubernetes configmaps: How to update configmap automatically into pods?

We often come acorss following questions while working with ConfigMap and secret are as follows;

  • How to Updating Kubernetes Deployments on a ConfigMap Change?
  • How Mounted ConfigMap is updated automatically in pods?
  • While changing in configmap it doesn’t reflect automatically, every time I have to restart the pod. How can I do it automatically?

Answer:

To update a configmap or secret resource which depends on a deployment(pod). Obviously, updating them is not a big deal. But how would you notify to relevant deployment/pod?

Method 1: Manual restart a pod/deploy which would update volume with latest configmaps and secrets.

kubectl v1.15 now provides a rollout restart sub-command that allows you to restart Pods in a Deployment – taking into account your surge/unavailability config – and thus have them pick up changes to a referenced ConfigMap, Secret or similar. It’s worth noting that you can use this with clusters older than v1.15, as it’s implemented in the client.

Example usage: kubectl rollout restart deploy/admission-control to restart a specific deployment. Easy as that!

$ kubectl rollout restart deploy nginx -n dev

Method 2: Automatic how would you notify to relevant deployment/pod on configmaps and secrets changes?

There are very good reference for this scnario are given below;

  • https://medium.com/@harik8/kubectl-restart-po-deploy-a5b4c6d523fe
  • https://blog.questionable.services/article/kubernetes-deployments-configmap-change/

Certification Courses

DevOpsSchool has introduced a series of professional certification courses designed to enhance your skills and expertise in cutting-edge technologies and methodologies. Whether you are aiming to excel in development, security, or operations, these certifications provide a comprehensive learning experience. Explore the following programs:

DevOps Certification, SRE Certification, and DevSecOps Certification by DevOpsSchool

Explore our DevOps Certification, SRE Certification, and DevSecOps Certification programs at DevOpsSchool. Gain the expertise needed to excel in your career with hands-on training and globally recognized certifications.