khuedoan-homelab/infra/cluster/homelab.yaml

113 lines
2.4 KiB
YAML
Raw Normal View History

2021-07-18 16:12:13 +07:00
apiVersion: cluster.x-k8s.io/v1alpha3
kind: Cluster
metadata:
2021-07-20 22:48:02 +07:00
name: homelab
2021-07-18 16:12:13 +07:00
namespace: default
spec:
clusterNetwork:
pods:
cidrBlocks:
- 10.244.0.0/16
services:
cidrBlocks:
- 10.96.0.0/12
controlPlaneRef:
apiVersion: controlplane.cluster.x-k8s.io/v1alpha3
kind: TalosControlPlane
2021-07-20 22:48:02 +07:00
name: homelab-cp
2021-07-18 16:12:13 +07:00
infrastructureRef:
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha3
kind: MetalCluster
2021-07-20 22:48:02 +07:00
name: homelab
2021-07-18 16:12:13 +07:00
---
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha3
kind: MetalCluster
metadata:
2021-07-20 22:48:02 +07:00
name: homelab
2021-07-18 16:12:13 +07:00
namespace: default
spec:
controlPlaneEndpoint:
2021-07-20 19:33:36 +07:00
host: 192.168.1.12
2021-07-18 16:12:13 +07:00
port: 6443
---
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha3
kind: MetalMachineTemplate
metadata:
2021-07-20 22:48:02 +07:00
name: homelab-cp
2021-07-18 16:12:13 +07:00
namespace: default
spec:
template:
spec:
serverClassRef:
apiVersion: metal.sidero.dev/v1alpha1
kind: ServerClass
2021-07-20 15:57:11 +07:00
name: m5.xlarge
2021-07-18 16:12:13 +07:00
---
apiVersion: controlplane.cluster.x-k8s.io/v1alpha3
kind: TalosControlPlane
metadata:
2021-07-20 22:48:02 +07:00
name: homelab-cp
2021-07-18 16:12:13 +07:00
namespace: default
spec:
controlPlaneConfig:
controlplane:
generateType: controlplane
talosVersion: v0.11.2
init:
generateType: init
talosVersion: v0.11.2
infrastructureTemplate:
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha3
kind: MetalMachineTemplate
2021-07-20 22:48:02 +07:00
name: homelab-cp
2021-07-18 16:12:13 +07:00
replicas: 1
2021-07-20 22:48:02 +07:00
version: v1.21.1
2021-07-18 16:12:13 +07:00
---
apiVersion: bootstrap.cluster.x-k8s.io/v1alpha3
kind: TalosConfigTemplate
metadata:
2021-07-20 22:48:02 +07:00
name: homelab-workers
2021-07-18 16:12:13 +07:00
namespace: default
spec:
template:
spec:
generateType: join
talosVersion: v0.11.2
---
apiVersion: cluster.x-k8s.io/v1alpha3
kind: MachineDeployment
metadata:
2021-07-20 22:48:02 +07:00
name: homelab-workers
2021-07-18 16:12:13 +07:00
namespace: default
spec:
2021-07-20 22:48:02 +07:00
clusterName: homelab
replicas: 0
2021-07-18 16:12:13 +07:00
selector:
matchLabels: null
template:
spec:
bootstrap:
configRef:
apiVersion: bootstrap.cluster.x-k8s.io/v1alpha3
kind: TalosConfigTemplate
2021-07-20 22:48:02 +07:00
name: homelab-workers
clusterName: homelab
2021-07-18 16:12:13 +07:00
infrastructureRef:
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha3
kind: MetalMachineTemplate
2021-07-20 22:48:02 +07:00
name: homelab-workers
version: v1.21.1
2021-07-18 16:12:13 +07:00
---
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha3
kind: MetalMachineTemplate
metadata:
2021-07-20 22:48:02 +07:00
name: homelab-workers
2021-07-18 16:12:13 +07:00
namespace: default
spec:
template:
spec:
serverClassRef:
apiVersion: metal.sidero.dev/v1alpha1
kind: ServerClass
2021-07-20 15:57:11 +07:00
name: m5.xlarge