This section will cover how to deploy a Controller in a bare-metal environment.
For The official documentation is already well-prepared for public cloud environments. If you are not deploying in a bare-metal environment, Please refer to https://ubuntu.com/kubernetes/docs for more information.
Juju is a tool that helps automate the deployment, configuration, and management of applications in cloud environments. It makes it easier to manage multiple applications and their interactions within the cloud.
sudo snap install juju --channel=2.9 --classic
Generate SSH keys:
Copy the generated SSH keys to the specified address
Replace "email@example.com" with the actual username and IP address. The following steps will continue in the same manner. There will be no further prompts.
Since we are not generating the nodes to be deployed via a cloud environment or infrastructure API, please enter "manual" here.
You can give a name to your private cloud. I'll use "ares-homelab" here.
This operation can be applied to both a copy on this client and to the one on a controller.
No current controller was detected and there are no registered controllers on this client: either bootstrap one or register one.
Select cloud type: manual
Enter a name for your manual cloud: ares-homelab
Enter the ssh connection string for controller, username@<hostname or IP> or <hostname or IP>: firstname.lastname@example.org
Cloud "ares-homelab" successfully added to your local client.
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’.
You can give a name to your Controller. I'll use "infra-demo" here.
juju bootstrap ares-homelab infra-demo --no-gui
In a production environment, it is recommended to deploy the Controller in high-availability (HA) mode, with a suggested number of 3 or 5 nodes. If you are only testing, this step can be skipped.
Enabling HA requires a minimum of three nodes
ssh-copy email@example.com ssh-copy firstname.lastname@example.org juju add-machine -m controller ssh:email@example.com juju add-machine -m controller ssh:firstname.lastname@example.org juju machines -m controller juju enable-ha --to=1,2 juju controllers --refresh
版权声明:本博客所有文章除特别声明外，均采用 BY-NC-SA 许可协议。转载请注明出处！