terraform: create ubuntu vms and install kubernetes with kubeadm
This commit is contained in:
29
kubernetes-kvm-terraform/common.tf
Normal file
29
kubernetes-kvm-terraform/common.tf
Normal file
@@ -0,0 +1,29 @@
|
||||
terraform {
|
||||
required_providers {
|
||||
libvirt = {
|
||||
source = "dmacvicar/libvirt"
|
||||
version = "~> 0.8"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
provider "libvirt" {
|
||||
uri = "qemu+ssh://novakj@192.168.0.7/system"
|
||||
}
|
||||
|
||||
|
||||
resource "libvirt_volume" "ubuntu_base" {
|
||||
name = "ubuntu-24.04-base.qcow2"
|
||||
pool = "default"
|
||||
create = {
|
||||
content = {
|
||||
url = "https://cloud-images.ubuntu.com/noble/current/noble-server-cloudimg-amd64.img"
|
||||
}
|
||||
}
|
||||
target = {
|
||||
format = {
|
||||
type = "qcow2"
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user