Installing behind a proxy

To let MicroK8s use a proxy we need to enter the proxy details in
${SNAP_DATA}/args/containerd-env (normally /var/snap/microk8s/current/args/containerd-env). The containerd-env file holds the environment variables containerd runs with. Setting the HTTPS_PROXY to your proxy endpoint enables containerd to fetch conatiner images from the web. Here is an example where HTTPS_PROXY is set to https://squid.internal:3128:

# Some additional environment variables
ulimit -n 65536 || true
ulimit -l 16384 || true

For the changes to take effect we need to restart MicroK8s:

microk8s stop
microk8s start