Kubernetes: Global environment variables for pods

September 30, 2020

I was trying to inject a few global environment variables to every container running, so one of the options was Pod Presets but I realize this feature was removed (check this pull request) probably in Kubernetes 1.20.x will disappear.

The alternative is to create a ConfigMap and use the envFrom to define all of the ConfigMap's data as container environment variables. The key from the ConfigMap becomes the environment variable name in the Pod.

Read more

Kubernetes multiple zones, autoscaling, and persistent volume

August 25, 2020

After a wild using Kubernetes in AWS and set-up persistent volumes via EBS, I faced a problem with evicted pods after they are re-schedule to another node; The issue was the EBS volumes are dedicated by zone, makes sense because the volumes work via networking and are dedicated per datacenter, for the network latency.

Read more


Trigger Jenkins jobs via API and curl

April 23, 2020

After upgrade Jenkins, we face an issue (Error 403 No valid crumb was included in the request). We have a few solution they need to trigger Jenkins's job externally via curl command before they start working. For trigger jobs we use a service account in Jenkins.

Read more


Kubernetes: Delete pods older than X days

February 14, 2020

I'm working with Airflow and the Kubernetes operator which deploys from Airflow a container to Kubernetes. The pods created by Airflow have ended so the final status of the pod could be Succeeded or Failed. I was looking for to delete the pods created by Airflow but older than 5 days, so we can still read the logs from the pods until they are deleted.

Read more