Can't deploy Kubernetes-core

Hi,

I am having trouble to install Kubernetes-core bundle on OpenStack. I have deployed controller, created model and when I run command:

juju deploy cs:bundle/kubernetes-core-1124

I receive error:

Located bundle "cs:bundle/kubernetes-core-1124"
Resolving charm: cs:~containers/containerd-94
Resolving charm: cs:~containers/easyrsa-333
Resolving charm: cs:~containers/etcd-540
Resolving charm: cs:~containers/flannel-506
Resolving charm: cs:~containers/kubernetes-master-891
Resolving charm: cs:~containers/kubernetes-worker-704
Executing changes:
  - upload charm cs:~containers/containerd-94 for series focal
 - deploy application containerd on focal using cs:~containers/containerd-94
ERROR cannot deploy bundle: containerd is not available on the following series: focal not supported

Does it mean, that problem is with charm containerd?

BR

Lumir

Thank you for the question!

The default Ubuntu series for the kubernetes-core is Ubuntu 20.04: Focal Fossa.

It sounds like your OpenStack cloud doesn’t have focal images available. What is the output of “openstack image list”? If focal images are missing from that list, you may need to add them to your OpenStack cloud.

If for some reason you can’t or don’t want to add the Focal images to your OpenStack, you can override the series for the bundle when deploying it:

juju deploy --series bionic kubernetes-core
1 Like

Hi, OpenStack has Focal image available.

openstack image list -f value

...
c13db6fd-a2f1-4716-9322-f3493d97a578 ubuntu-1804-lts active
63bbb35f-4481-4e9a-8a89-df08cb34d63a ubuntu-2004-lts active

I also tried create controller using metadata:

juju metadata generate-image -d simplestreams -i 63bbb35f-4481-4e9a-8a89-df08cb34d63a -s focal -r swe2 -u https://<URL>:5000/v3
juju bootstrap ... --metadata-source simplestreams/images

It’s still not working.

L.

It’s a bundle, --series parameter can’t be applied.

L.

This is strange. cs:~containers/containerd-94 is definitely available on Focal (see metadata). This is also the same revision of containerd that’s used in the full Charmed Kubernetes bundle, which also defaults to Focal.

I’m not sure why Juju is reporting that the charm is not supported on Focal.

It’s a bundle, --series parameter can’t be applied.

I stand corrected. That seems like an unnecessary limitation. Well, the overlay approach would be to create the following overlay.yaml file and then deploy it with juju deploy kubernetes-core --overlay ./overlay.yaml:

series: bionic
1 Like

It helped, but now I am receiving error:

- add unit etcd/0 to new machine 0
ERROR cannot deploy bundle: cannot add unit for application "etcd": acquiring machine to host unit "etcd/0": cannot assign unit "etcd/0" to machine 0: series does not match

Btw, could you point me to the documentation, what parameters can be specified in overlay.yml, and what can be specified in --config ?

Many thanks in advance.

L.

Oh, I see what the issue there is. The kubernetes-core bundle uses co-location the keep the machine count as low as possible, so it specifies the machines directly, including series. Those will need to be overridden as well as the bundle-level series for the charms or nothing will be able to be placed. The overlay would then become:

series: bionic
machines:
  '0':
    series: bionic
  '1':
    series: bionic

The yaml file provided to --config can only override charm config values, while the yaml file provided to --overlay can override literally anything in the bundle, including removing sections by setting their value to null. You can find info about overlays within the general bundle documentation, but the TL;DR is that they have the same syntax as a bundle (with the addition of the null value support mentioned above) and anything specified in the overlay will add to or take precedence over the same field in the bundle, and multiple overlays can be stacked and will be applied in order. They can also be appended to the bundle’s YAML file itself using the multi-document syntax for YAML, in cases where that might be useful.

I am still confused as to why Focal isn’t working for you, though, because we have that tested daily in CI without issue.

Thanks! I downloaded the bundle.yml, modified series from focal to bionic and deployed it

juju deploy ./bundle.yml

L.