Juju default registry setting with k8s cloud

Hi,

i deployed a charmed k8s and then i added it as a cloud managed by juju by: juju add-k8s cloud-k8s --controller $(juju switch | cut -d: -f1) juju add-model cos cloud-k8s

then i tried to deploy the cos-lite bundle: it worked by creating a modeloperator in the “cos” namespace but it fails fetching the desired image and i’m behind a proxy

the kubectl describe command shows

Normal Scheduled 12m default-scheduler Successfully assigned cos/modeloperator-85896ff44d-bw26h to juju-360533-k8s-8

Warning Failed 11m kubelet Failed to pull image “jujusolutions/jujud-operator:2.9.28”: rpc error: code = Unknown desc = failed to pull and unpack image “docker.io/jujusolutions/jujud-operator:2.9.28”: failed to resolve reference “docker.io/jujusolutions/jujud-operator:2.9.28”: failed to do request: Head https://registry-1.docker.io/v2/jujusolutions/jujud-operator/manifests/2.9.28: dial tcp 3.215.51.67:443: i/o timeout

is there a way to edit the default registry to look for images?

Thank you

I know that microk8s can injest an image from a local docker repo:

docker image save <image name> | microk8s ctr image import -

That command dumps the raw image to stdout, and pipes it into an image registry in microk8s.

@kwmonroe does charmed k8s have a similar tool?

mmm no i meant a different thing: in charmed k8s (not microk8s) i passed the default registry to kubernetes-control-plane charm in order to fetch images from a local registry (not dockerhub or docker.io). when i use juju to deploy operators it seems going on the public one.

The Juju controller has a separate registry, which isn’t necessarily pointed at the registry that the kubernetes-control-plane charm creates. You need to get the image into the Juju controller’s registry. The microk8s command is basically just a wrapper around the commands necessary to do so. I don’t know if there’s a similar shortcut in charmed-k8s.

i’m not using microk8s so i don’t even have the cmdline.

How to setup a default container registry for the juju controllers?

How to setup a default container registry for the juju controllers?

I do not know, which is why I pinged @kwmonroe. @benhoyt might be able to help you, as well. (Tagging them so that they see this.)

hi,

good news it is in containerd config

here you can override docker.io with on prem registry and it seems working so far

1 Like