![]() ![]() Libvirt.disk_driver :cache => 'writeback' Su -c "printf 'cd /home/#/.ssh/authorized_keys # 'mycluster-w4' => ,Ĭonfig.vm.provision 'file', source: '~/.ssh/id_rsa.pub', destination: '/tmp/id_rsa.pub'Ĭonfig.vm.provision 'file', source: './hosts', destination: '/tmp/hosts'Ĭonfig.vm.provision 'shell', privileged: true, inline: /etc/sudoers.d/ubuntu Install Vagrant and create a Vagrantfile like below: ENV = 'libvirt' So let's add some host names to our /etc/hosts 192.168.122.191 mycluster-cpġ92.168.122.197 mycluster-w4 Infrastructure as Code (IaC) You can see our static address range is 192.168.122.1/24. If you don't have a bridge set up you can create one manually (assuming enp3s0 is your ethernet interface name): $ sudo ip link set enp3s0 up $ ip link show type bridgeĥ: virbr0: mtu 1500 qdisc noqueue state DOWN group default qlen 1000 In Ubuntu 22.04 you should already have one called virbr0. You should already have Ansible and QEMU/KVM setup and an ssh key created using ssh-keygen -t rsa.įirst thing you need to do is make sure you have a virtual bridge. If you have a decent multi-core CPU with enough RAM running Ubuntu there's no reason not to use it for your Kubernetes home lab instead of a cloud service. Kubernetes with kubeadm and QEMU/KVM on Ubuntu
0 Comments
Leave a Reply. |