From a9e26e39cd478ebe1de57aea2efda6d255264dee Mon Sep 17 00:00:00 2001 From: Vassiliy Yegorov Date: Wed, 25 Jun 2025 13:23:28 +0700 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=20=D0=BD=D0=BE=D0=B2=D1=8B=D0=B9=20CIDR=20192.168.23.24/?= =?UTF-8?q?32=20=D0=B2=20ippool.yaml=20=D0=B8=20=D1=80=D0=B0=D1=81=D0=BA?= =?UTF-8?q?=D0=BE=D0=BC=D0=BC=D0=B5=D0=BD=D1=82=D0=B8=D1=80=D0=BE=D0=B2?= =?UTF-8?q?=D0=B0=D0=BD=20=D1=80=D0=B5=D1=81=D1=83=D1=80=D1=81=20piraeus.y?= =?UTF-8?q?aml=20=D0=B2=20kustomization.yaml.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- k0smotron/hetzner-test.yaml | 123 ++++++++++++++++++ .../clusters/t8s-demo/kustomization.yaml | 2 +- talos-k8s/cilium/ippool.yaml | 1 + 3 files changed, 125 insertions(+), 1 deletion(-) create mode 100644 k0smotron/hetzner-test.yaml diff --git a/k0smotron/hetzner-test.yaml b/k0smotron/hetzner-test.yaml new file mode 100644 index 0000000..32dee52 --- /dev/null +++ b/k0smotron/hetzner-test.yaml @@ -0,0 +1,123 @@ +apiVersion: v1 +kind: Namespace +metadata: + name: k0s-test +--- +apiVersion: cluster.x-k8s.io/v1beta1 +kind: Cluster +metadata: + name: hetzner-test + namespace: k0s-test +spec: + clusterNetwork: + pods: + cidrBlocks: + - 10.244.0.0/16 + services: + cidrBlocks: + - 10.96.0.0/12 + controlPlaneRef: + apiVersion: controlplane.cluster.x-k8s.io/v1beta1 + kind: K0smotronControlPlane # This tells that k0smotron should create the controlplane + name: hetzner-test-cp + infrastructureRef: + apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 + kind: HetznerCluster + name: hetzner-test +--- +apiVersion: controlplane.cluster.x-k8s.io/v1beta1 +kind: K0smotronControlPlane # This is the config for the controlplane +metadata: + name: hetzner-test-cp + namespace: k0s-test +spec: + version: v1.33.2-k0s.0 + persistence: + type: emptyDir + service: + type: LoadBalancer + apiPort: 6443 + konnectivityPort: 8132 + annotations: + load-balancer.hetzner.cloud/location: fsn1 +--- +apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 +kind: HetznerCluster +metadata: + name: hetzner-test + namespace: k0s-test + annotations: + cluster.x-k8s.io/managed-by: k0smotron # This marks the base infra to be self managed. The value of the annotation is irrelevant, as long as there is a value. +spec: + controlPlaneLoadBalancer: + enabled: false + controlPlaneEndpoint: # This is just a placeholder, can be anything as k0smotron will overwrite it + host: "5.75.210.176" + port: 6443 + controlPlaneRegions: + - fsn1 + hetznerSecretRef: + name: hetzner + key: + hcloudToken: hcloud +--- +apiVersion: cluster.x-k8s.io/v1beta1 +kind: MachineDeployment +metadata: + name: hetnzer-test-md + namespace: k0s-test +spec: + clusterName: hetzner-test + replicas: 3 + selector: + matchLabels: + cluster.x-k8s.io/cluster-name: hetzner-test + pool: worker-pool-1 + template: + metadata: + labels: + cluster.x-k8s.io/cluster-name: hetzner-test + pool: worker-pool-1 + spec: + clusterName: hetzner-test + bootstrap: + configRef: # This triggers our controller to create cloud-init secret + apiVersion: bootstrap.cluster.x-k8s.io/v1beta1 + kind: K0sWorkerConfigTemplate + name: hetzner-test-machine-config + infrastructureRef: + apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 + kind: HCloudMachineTemplate + name: hetzner-test-mt +--- +apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 +kind: HCloudMachineTemplate +metadata: + name: hetzner-test-mt + namespace: k0s-test +spec: + template: + spec: + imageName: ubuntu-24.04 + type: cpx21 + sshKeys: + - name: vasyansk +--- +apiVersion: bootstrap.cluster.x-k8s.io/v1beta1 +kind: K0sWorkerConfigTemplate +metadata: + name: hetzner-test-machine-config + namespace: k0s-test +spec: + template: + spec: + version: v1.33.2+k0s.0 + # More details of the worker configuration can be set here +--- +apiVersion: v1 +kind: Secret +data: + hcloud: UWlBNTYxOEJ3cDVxd05MQTZBVjlkNHBGY09VSUlXWUxBODE2TTRRc0pIUlJMT0JlTWprbjJ6VkJBc1RIbjZsOA== +metadata: + name: hetzner + namespace: k0s-test diff --git a/talos-k8s-flux/clusters/t8s-demo/kustomization.yaml b/talos-k8s-flux/clusters/t8s-demo/kustomization.yaml index 2a227ca..3d19f0c 100644 --- a/talos-k8s-flux/clusters/t8s-demo/kustomization.yaml +++ b/talos-k8s-flux/clusters/t8s-demo/kustomization.yaml @@ -19,7 +19,7 @@ resources: - ../../soft/pgadmin.yaml - ../../soft/coroot.yaml -# - install/piraeus.yaml +- install/piraeus.yaml # - install/nfs-provisioner.yaml - install/cert-manager.yaml - install/ingress-nginx.yaml diff --git a/talos-k8s/cilium/ippool.yaml b/talos-k8s/cilium/ippool.yaml index 408cd70..b787e11 100644 --- a/talos-k8s/cilium/ippool.yaml +++ b/talos-k8s/cilium/ippool.yaml @@ -5,3 +5,4 @@ metadata: spec: blocks: - cidr: 192.168.23.23/32 + - cidr: 192.168.23.24/32