Docker Kubernetes – Is It Possible to Set Env Vars for Containerd?

containerddockerkubernetes

I am currently trying to switch my K8 nodes from using dockerd to containerd. For environment-specific reasons, I ned to specify http_proxy.

In the dockerd world, I can specify environment variables by using the following steps.

  1. Putting lines such as the following into /etc/environment-systemd:
http_proxy=http://dns_name_of_my_proxy
  1. Adding the following line to /usr/lib/systemd/system/docker.service:
EnvironmentFile=-/etc/environment-systemd

How can I do the equivalent operation for containerd?

I looked at the man page for containerd's config and did not see any thing about setting environment variables for proxies.