ubuntu20.04下使用juju+maas环境部署k8s-1-部署vm自动供给

参考文档:
Kubernetes documentation
多节点OpenStack Charms 部署指南0.0.1.–31–vm hosting-1
多节点OpenStack Charms 部署指南0.0.1.–32–vm hosting-2-VM host networking (snap/2.9/UI)
Charmed Kubernetes #679

多节点OpenStack Charms 部署指南0.0.1.dev223–2-安装MAAS
多节点OpenStack Charms 部署指南0.0.1.dev223–3-安装Juju


本系列主要目的是记录在ubuntu20.04下,使用juju+maas环境,使用lxd在vm自供给方式下,部署charmed kubernets #679过程。

1 部署juju+maas
参见:
多节点OpenStack Charms 部署指南0.0.1.dev223–2-安装MAAS
多节点OpenStack Charms 部署指南0.0.1.dev223–3-安装Juju

2 部署vm自供给

2.1 使用MAAS UI设置VM主机

参见多节点OpenStack Charms 部署指南0.0.1.–32–vm hosting-2-VM host networking (snap/2.9/UI)

ubuntu20.04下使用juju+maas环境部署k8s-1-部署vm自动供给_第1张图片
ubuntu20.04下使用juju+maas环境部署k8s-1-部署vm自动供给_第2张图片
ubuntu20.04下使用juju+maas环境部署k8s-1-部署vm自动供给_第3张图片
2.2 在这几台主机上部署ubuntu20.04。

2.3 在ubuntu 20.04安装lxd,并初始化。

参见多节点OpenStack Charms 部署指南0.0.1.–32–vm hosting-2-VM host networking (snap/2.9/UI)

sudo snap refresh

sudo lxd init

按如下交互填写即可:

Would you like to use LXD clustering? (yes/no) [default=no]: no
Do you want to configure a new storage pool? (yes/no) [default=yes]: yes
Name of the new storage pool [default=default]:  
Name of the storage back-end to use (btrfs, dir, lvm, zfs, ceph) [default=zfs]: dir
Would you like to connect to a MAAS server? (yes/no) [default=no]: no
Would you like to create a new local network bridge? (yes/no) [default=yes]: no
Would you like to configure LXD to use an existing bridge or host interface? (yes/no) [default=no]: yes
Name of the existing bridge or host interface: br0
Would you like LXD to be available over the network? (yes/no) [default=no]: yes
pAddress to bind LXD to (not including port) [default=all]:
Port to bind LXD to [default=8443]:
Trust password for new clients:
Again:
Would you like stale cached images to be updated automatically? (yes/no) [default=yes]
Would you like a YAML "lxd init" preseed to be printed? (yes/no) [default=no]:

2.4 添加vm宿主机
参见:多节点OpenStack Charms 部署指南0.0.1.–33–vm hosting-3-Adding a VM host (snap/2.9/UI)

在这里插入图片描述
使用lxd添加vm宿主机:
ubuntu20.04下使用juju+maas环境部署k8s-1-部署vm自动供给_第4张图片
lxd地址格式类似:

https://10.0.0.100:8443

lxd password注意和上面2.3节中

Trust password for new clients:

填写得密码要一致。

这样,vm虚拟主机自动供给,部署完毕。

你可能感兴趣的:(k8s,juju,maas,k8s)