These instructions represent the complete set of commands you need to enter into your terminal to install Charmed Kubernetes on your local machine with LXD. Be advised that the full installation of Charmed Kubernetes is only recommended for a machine with 32GB RAM and 250GB of SSD storage.
Not what you’re looking for? See our other guides ›
LXD is a system container and VM hypervisor that allows you to create a local cloud. It can be installed via a snap package.
sudo snap install lxd --classic
Don’t have the snap command? Get set for snaps
LXD provides an interactive dialogue to configure your local cloud during the initialisation procedure:
lxd init
The init script itself may vary depending on the version of LXD. You can use most default options in the dialogue. The important configuration options for Charmed Kubernetes are:
Juju is a tool for deploying, configuring and operating complex software on public or private clouds. It can be installed with a snap:
sudo snap install juju --classic
The Juju controller is used to manage the software deployed through Juju, from deployment to upgrades to day-two operations. One Juju controller can manage multiple projects or workspaces, which in Juju are known as ‘models’.
Juju comes preconfigured to work with LXD. A cloud created by using LXD containers on the local machine is known as localhost to Juju. To begin, you need to create a Juju controller for this cloud:
juju bootstrap localhost
The model holds a specific deployment. It is a good idea to create a new one specifically for each deployment.
juju add-model k8s
Remember that you can have multiple models on each controller, so you can deploy multiple Kubernetes clusters or other applications.
Deploy the Kubernetes bundle to the model. This will add instances to the model and deploy the required applications. This can take up to 20 minutes depending on your machine.
juju deploy charmed-kubernetes
Juju is now busy creating instances, installing software and connecting the different parts of the cluster together, which can take several minutes. You can monitor what’s going on by running:
watch -c juju status --color
To view the last twenty log messages for the “k8s” model:
juju debug-log -m k8s -n 20
Congratulations! You have a Kubernetes cluster up and running - now let’s use it! The link below takes you to the operations guide, detailing some of the common things you’ll want to do next: