2 min read
We can read values from a ConfigMap as a volume but we can present them to a Pod as an environment variable
27/10/2022
Read more...2 min read
When configuring command line arguments for containers we might need to be able to use certain values that might be elsewhere like the name of the current namespace.
We can use environment variables as the source of the information without having to write a wrappet to actually populate them
26/08/2022
Read more...5 min read
If you run Kubernetes workloads on AWS you want to make sure Pods are spread across all the available availability zones. To do so we can use podAntiAffinity to tell Kubernetes to avoid deploying all the Pods of the same deployment on the same AZ
28/03/2022
Read more...2 min read
If you try to run too many pods on a handful of nodes you might eventually run out of available Pods. Using kubectl get pods you'll see them marked with the status OutOfpods:
$ kubectl get pods
(...)
test deploy-test-84b4fdcbbd-59hvf 0/1 ContainerCreating 0 44s
test deploy-test-84b4fdcbbd-7dvs9 0/1 OutOfpods 0 62s
test deploy-test-84b4fdcbbd-btrwz 0/1 OutOfpods 0 4m16s
test deploy-test-84b4fdcbbd-gpkkg 0/1 OutOfpods 0 91s
test deploy-test-84b4fdcbbd-hbbdv 0/1 OutOfpods 0 67s
test deploy-test-84b4fdcbbd-j75x4 0/1 OutOfpods 0 68s
test deploy-test-84b4fdcbbd-s4qzz 0/1 OutOfpods 0 64s
(...)
11/03/2022
Read more...3 min read
When a container in a Pod is crashing sometimes it's logs are not enough to fully understand what's going on. One way to approach this situation the command it runs to something that won't make Kubernetes restart the container: For example a sleep command
08/03/2022
Read more...