FeatureRequest: Bootstrap a Controller via PodSpec

Hello,

We have an upcoming use case where we will be provisioning a juju controller as part of our k8s based infrastructure. Diving into how we might accomplish this task we were immediately frustrated as the only way to bootstrap a controller seems to be using the juju client binary itself (which can only be ran as a snap).

This presents 2 issues; 1) an assumption that the place you want to bootstrap juju from can run snaps (not happening on machines with nfs homes), 2) the juju client is a dependency in order to bootstrap a controller.

Problem

An ubuntu machine with juju client installed is needed in order to bootstrap a controller in k8s.

Solution

Define a workflow for provisioning a juju controller in k8s by applying a manifest.

I feel that providing an alternate path to provisioning a running controller will increase the ease-of-use and uptake of juju in k8s environments.

Thoughts?

Hi James!

So I’ll leave others to comment in detail on the bootstrap process. My sense is that just having a bunch of Kubernetes manifests to apply could be really quite complex, and would involve a lot of manual setup to then get communications going with the controller.

That said, we do make the Juju binaries available for download in standard binary formats, without the requirement for a snap package if you’re unable to consume it that way. Obviously I’d recommend using snapd wherever you can so you benefit from automatic updates etc., but if you’d like to try the binaries out you can find them here:

Hope this helps!

Jon

FWIW, we have tossed around the idea of bootstrapping a juju controller simply by kubectl applying a k8s manifest, but as John says, it’s not trivial - a bunch of logic is needed to generate CA cert, check ssh keys, mongo setup, api password, and other artifacts, plus record client side api info for subsequent connectivity etc etc. So you’d need a “bootstrap” client of some sort to run all that logic. And you’d still need a juju client to actually operate juju; in general, one would kinda expect to need a “foo” client to operate “foo”? Luckily, the juju client is a single statically compiled binary so there are the options John mentions if snaps are not viable on your environment. There’s even a slimmed down, k8s only client that can be used eg https://launchpad.net/juju/2.9/2.9.22/+download/juju-2.9.22-k8s.tar.xz

@wallyworld @jnsgruk makes sense. Thank you for the reseponse!

1 Like