Добавлен новый CIDR 192.168.23.24/32 в ippool.yaml и раскомментирован ресурс piraeus.yaml в kustomization.yaml.

This commit is contained in:
2025-06-25 13:23:28 +07:00
parent b23b509bbe
commit a9e26e39cd
3 changed files with 125 additions and 1 deletions

123
k0smotron/hetzner-test.yaml Normal file
View File

@@ -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

View File

@@ -19,7 +19,7 @@ resources:
- ../../soft/pgadmin.yaml - ../../soft/pgadmin.yaml
- ../../soft/coroot.yaml - ../../soft/coroot.yaml
# - install/piraeus.yaml - install/piraeus.yaml
# - install/nfs-provisioner.yaml # - install/nfs-provisioner.yaml
- install/cert-manager.yaml - install/cert-manager.yaml
- install/ingress-nginx.yaml - install/ingress-nginx.yaml

View File

@@ -5,3 +5,4 @@ metadata:
spec: spec:
blocks: blocks:
- cidr: 192.168.23.23/32 - cidr: 192.168.23.23/32
- cidr: 192.168.23.24/32