add-machine command stuck

I created a manual cloud and made the bootstrap.

My environment is composed by machine with juju client connected to internet through a proxy and a controller machine without any internet connection, plus other machine without internet connection too.

I am following [Installing Charmed Kubernetes on Existing Machines | Ubuntu] (https://ubuntu.com/kubernetes/docs/install-existing) guide but I stuck at this step:

juju add-machine ssh:user@kube1

where the logs stay blocked here:

15:30:14 INFO  juju.cmd supercommand.go:56 running juju [3.5.4 31b4b0914740b84ad8166993635ac797a44276de gc go1.23.1]
15:30:14 DEBUG juju.cmd supercommand.go:57   args: []string{"/snap/juju/28520/bin/juju", "add-machine", "ssh:user@kube1", "--debug", "--verbose"}
15:30:14 INFO  juju.juju api.go:86 connecting to API addresses: [controller.localdomain :17070 10.112.112.133:17070]
15:30:14 DEBUG juju.api apiclient.go:1036 successfully dialed "wss://controller.localdomain :17070/model/f8d948f4-1958-443b-8c87-07740f1f087c/api"
15:30:14 INFO  juju.api apiclient.go:938 cannot resolve "controller": lookup controller.localdomain : operation was canceled
15:30:14 INFO  juju.api apiclient.go:571 connection established to "wss://controller.localdomain :17070/model/f8d948f4-1958-443b-8c87-07740f1f087c/api"
15:30:14 INFO  juju.cmd.juju.machine add.go:318 load config
15:30:14 INFO  juju.juju api.go:86 connecting to API addresses: [controller.localdomain :17070 10.112.112.133:17070]
15:30:15 DEBUG juju.api apiclient.go:689 looked up controller.localdomain -> [10.112.112.133]

In the meanwhile the controller logs report this connectivity error but is normal because there is no internet connection:

e8f59093-b9ab-438c-84ae-3a372e1f7ac4: machine-0 2024-10-10 15:29:49 WARNING juju.environs.simplestreams datasource.go:212 Got error requesting "https://streams.canonical.com/juju/tools/streams/v1/index2.sjson": Get "https://streams.canonical.com/juju/tools/streams/v1/index2.sjson": dial tcp: lookup streams.canonical.com on 127.0.0.53:53: no such host
e8f59093-b9ab-438c-84ae-3a372e1f7ac4: machine-0 2024-10-10 15:29:50 WARNING juju.environs.simplestreams datasource.go:212 Got error requesting "https://streams.canonical.com/juju/tools/streams/v1/index2.sjson": Get "https://streams.canonical.com/juju/tools/streams/v1/index2.sjson": dial tcp: lookup streams.canonical.com on 127.0.0.53:53: no such host
e8f59093-b9ab-438c-84ae-3a372e1f7ac4: machine-0 2024-10-10 15:29:52 WARNING juju.environs.simplestreams datasource.go:212 Got error requesting "https://streams.canonical.com/juju/tools/streams/v1/index2.sjson": Get "https://streams.canonical.com/juju/tools/streams/v1/index2.sjson": dial tcp: lookup streams.canonical.com on 127.0.0.53:53: no such host
e8f59093-b9ab-438c-84ae-3a372e1f7ac4: machine-0 2024-10-10 15:29:52 ERROR juju.worker.dependency engine.go:695 "tools-version-checker" manifold worker returned unexpected error: cannot update agent binaries information: cannot get latest version: cannot find available agent binaries: cannot read index data, attempt count exceeded: cannot access URL "https://streams.canonical.com/juju/tools/streams/v1/index2.sjson": Get "https://streams.canonical.com/juju/tools/streams/v1/index2.sjson": dial tcp: lookup streams.canonical.com on 127.0.0.53:53: no such host

what step I miss?

I think the issue is relatedy with controller connectivity with internet, because I found exception like the following:

> Traceback (most recent call last):
>   File "/var/lib/juju/agents/unit-controller-0/charm/src/unixsocket.py", line 106, in request_raw
>     response = self.opener.open(request, timeout=self.timeout)
>   File "/usr/lib/python3.10/urllib/request.py", line 519, in open
>     response = self._open(req, data)
>   File "/usr/lib/python3.10/urllib/request.py", line 536, in _open
>     result = self._call_chain(self.handle_open, protocol, protocol +
>   File "/usr/lib/python3.10/urllib/request.py", line 496, in _call_chain
>     result = func(*args)
>   File "/var/lib/juju/agents/unit-controller-0/charm/src/unixsocket.py", line 140, in http_open
>     return self.do_open(_UnixSocketConnection, req,  # type:ignore
>   File "/usr/lib/python3.10/urllib/request.py", line 1351, in do_open
>     raise URLError(err)
> urllib.error.URLError: <urlopen error [Errno 2] No such file or directory>