You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Those environment variables are exported for the containerd process. That does NOT mean that they are injected into container env vars. Env vars for your containers must be set in the pod spec; there is no way built in to Kubernetes or containerd to inject "default" vars that are set even if not in the pod spec.
I'm using the k3s with https://github.com/k3s-io/k3s/releases/download/v1.30.0%2Bk3s1/k3s & https://github.com/k3s-io/k3s/releases/download/v1.30.0%2Bk3s1/k3s-airgap-images-amd64.tar.gz.
I found the right configuration of proxy is as follows:
Allow passing targeted environment variables to containerd #3553
https://docs.k3s.io/advanced#configuring-an-http-proxy
As description, I just need to export the proxy variables when I install the k3s as following:
And the environment vars will be added to /etc/systemd/system/k3s.service.env which can be verified.
However, I started a test daemonset to echo the env in pod (containerd), and I got empty environment var:
Result:
![image](https://private-user-images.githubusercontent.com/8100696/331271606-b51b25b4-34ba-46e7-87fb-07d4ac262262.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjAwODAyMjIsIm5iZiI6MTcyMDA3OTkyMiwicGF0aCI6Ii84MTAwNjk2LzMzMTI3MTYwNi1iNTFiMjViNC0zNGJhLTQ2ZTctODdmYi0wN2Q0YWMyNjIyNjIucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDcwNCUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA3MDRUMDc1ODQyWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9MDUwYTMyNGY4OGQ0NDAwODEwMGZiZjI1MDYxOTFlNzZhMmIyM2ZjZmVhNTU2ZTc4ODc4NzFmOTZiMzM3NmNiNyZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.1fdx9u0GeGZN2hN0irrMkyTUP0pOoTnxMjxAKkuQnPM)
The text was updated successfully, but these errors were encountered: