Add tenant01 k0s cluster with Tinkerbell hardware

This commit is contained in:
Pavel Basov
2025-12-15 21:08:14 +01:00
commit b77e4211c8
7 changed files with 346 additions and 0 deletions

32
hardware/bmc-secrets.yaml Normal file
View File

@@ -0,0 +1,32 @@
---
apiVersion: v1
kind: Secret
metadata:
name: vm1-bmc
namespace: tenant01
type: Opaque
stringData:
username: admin
password: password
---
apiVersion: v1
kind: Secret
metadata:
name: vm2-bmc
namespace: tenant01
type: Opaque
stringData:
username: admin
password: password
---
apiVersion: v1
kind: Secret
metadata:
name: vm3-bmc
namespace: tenant01
type: Opaque
stringData:
username: admin
password: password

62
hardware/bmc.yaml Normal file
View File

@@ -0,0 +1,62 @@
---
apiVersion: bmc.tinkerbell.org/v1alpha1
kind: Machine
metadata:
name: vm1
namespace: tenant01
spec:
connection:
host: 172.16.81.254
port: 6231
insecureTLS: true
authSecretRef:
name: vm1-bmc
namespace: tenant01
providerOptions:
preferredOrder:
- ipmitool
ipmitool:
port: 6231
cipherSuite: "3"
---
apiVersion: bmc.tinkerbell.org/v1alpha1
kind: Machine
metadata:
name: vm2
namespace: tenant01
spec:
connection:
host: 172.16.81.254
port: 6232
insecureTLS: true
authSecretRef:
name: vm2-bmc
namespace: tenant01
providerOptions:
preferredOrder:
- ipmitool
ipmitool:
port: 6232
cipherSuite: "3"
---
apiVersion: bmc.tinkerbell.org/v1alpha1
kind: Machine
metadata:
name: vm3
namespace: tenant01
spec:
connection:
host: 172.16.81.254
port: 6233
insecureTLS: true
authSecretRef:
name: vm3-bmc
namespace: tenant01
providerOptions:
preferredOrder:
- ipmitool
ipmitool:
port: 6233
cipherSuite: "3"

119
hardware/hardware.yaml Normal file
View File

@@ -0,0 +1,119 @@
---
apiVersion: tinkerbell.org/v1alpha1
kind: Hardware
metadata:
name: vm1
namespace: tenant01
labels:
tinkerbell.org/role: worker
spec:
bmcRef:
apiGroup: bmc.tinkerbell.org
kind: Machine
name: vm1
disks:
- device: /dev/vda
interfaces:
- dhcp:
arch: x86_64
hostname: vm1
mac: "52:54:00:12:34:01"
ip:
address: 172.16.81.101
gateway: 172.16.81.1
netmask: 255.255.255.0
name_servers:
- 8.8.8.8
lease_time: 4294967294
uefi: true
disableDhcp: false
netboot:
allowPXE: true
allowWorkflow: true
metadata:
instance:
hostname: vm1
id: "52:54:00:12:34:01"
operating_system:
distro: debian
version: "13"
---
apiVersion: tinkerbell.org/v1alpha1
kind: Hardware
metadata:
name: vm2
namespace: tenant01
labels:
tinkerbell.org/role: worker
spec:
bmcRef:
apiGroup: bmc.tinkerbell.org
kind: Machine
name: vm2
disks:
- device: /dev/vda
interfaces:
- dhcp:
arch: x86_64
hostname: vm2
mac: "52:54:00:12:34:02"
ip:
address: 172.16.81.102
gateway: 172.16.81.1
netmask: 255.255.255.0
name_servers:
- 8.8.8.8
lease_time: 4294967294
uefi: true
disableDhcp: false
netboot:
allowPXE: true
allowWorkflow: true
metadata:
instance:
hostname: vm2
id: "52:54:00:12:34:02"
operating_system:
distro: debian
version: "13"
---
apiVersion: tinkerbell.org/v1alpha1
kind: Hardware
metadata:
name: vm3
namespace: tenant01
labels:
tinkerbell.org/role: worker
spec:
bmcRef:
apiGroup: bmc.tinkerbell.org
kind: Machine
name: vm3
disks:
- device: /dev/vda
interfaces:
- dhcp:
arch: x86_64
hostname: vm3
mac: "52:54:00:12:34:03"
ip:
address: 172.16.81.103
gateway: 172.16.81.1
netmask: 255.255.255.0
name_servers:
- 8.8.8.8
lease_time: 4294967294
uefi: true
disableDhcp: false
netboot:
allowPXE: true
allowWorkflow: true
metadata:
instance:
hostname: vm3
id: "52:54:00:12:34:03"
operating_system:
distro: debian
version: "13"

View File

@@ -0,0 +1,9 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: tenant01
resources:
- bmc-secrets.yaml
- bmc.yaml
- hardware.yaml