The Calico CNI plugin inherits HTTP proxy variables from containerd. When it tries to reach the Kubernetes API at 10.5.0.157, the request gets sent to the HTTP proxy, which refuses to proxy the request and replies with 403 Forbidden.
I recommend setting the containerd charm's no_proxy config to:
127.0.0.1,localhost,::1,10.5.0.0/16
to ensure that traffic to the 10.5.0.0/16 network does not go through the HTTP proxy. Can you give that a try and let us know if it works?
From the crashdump, Calico CNI is getting a Forbidden response trying to talk to the Kubernetes API. From kubelet:
Failed to create pod sandbox: rpc error: code = Unknown desc = failed to setup network for sandbox "e61f7be828eb2f 62bfef34c9388cb 84fe2fd6594ab12 17228": Get "https:/ /10.5.0. 157:6443/ api/v1/ namespaces/ ingress- nginx-kubernete s-worker": Forbidden
592311becf8a8eb
It looks like your containerd charm is configured with:
http_proxy: http:// squid.internal: 3128 squid.internal: 3128
https_proxy: http://
no_proxy: <blank>
The Calico CNI plugin inherits HTTP proxy variables from containerd. When it tries to reach the Kubernetes API at 10.5.0.157, the request gets sent to the HTTP proxy, which refuses to proxy the request and replies with 403 Forbidden.
I recommend setting the containerd charm's no_proxy config to:
127.0.0. 1,localhost, ::1,10. 5.0.0/16
to ensure that traffic to the 10.5.0.0/16 network does not go through the HTTP proxy. Can you give that a try and let us know if it works?