Удален файл конфигурации hetzner-test.yaml и добавлены инструкции по созданию локального кластера в README.md для talos-k8s и talos-k8s-flux.
This commit is contained in:
@@ -1,123 +0,0 @@
|
|||||||
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
|
|
@@ -3,3 +3,16 @@
|
|||||||
```bash
|
```bash
|
||||||
flux bootstrap git --url=https://git.realmanual.ru/pub/courses/talos-kurs.git --token-auth --path=talos-k8s-flux/clusters/t8s-demo
|
flux bootstrap git --url=https://git.realmanual.ru/pub/courses/talos-kurs.git --token-auth --path=talos-k8s-flux/clusters/t8s-demo
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Hacks
|
||||||
|
|
||||||
|
linstor
|
||||||
|
|
||||||
|
alias linstor='kubectl -n piraeus-datastore exec deploy/linstor-controller -- linstor'
|
||||||
|
|
||||||
|
commands:
|
||||||
|
|
||||||
|
* linstor node list
|
||||||
|
* linstor physical-storage list
|
||||||
|
* linstor storage-pool list
|
||||||
|
* linstor resource list-volumes
|
||||||
|
@@ -14,6 +14,18 @@ ISO-образы для архитектур amd64 и arm64 доступны н
|
|||||||
[руководству по началу работы](https://www.talos.dev/v1.9/introduction/getting-started/)
|
[руководству по началу работы](https://www.talos.dev/v1.9/introduction/getting-started/)
|
||||||
[фабрика по сборке iso](https://factory.talos.dev/)
|
[фабрика по сборке iso](https://factory.talos.dev/)
|
||||||
|
|
||||||
|
## Локальный кластер
|
||||||
|
|
||||||
|
нужен установленный docker
|
||||||
|
|
||||||
|
```bash
|
||||||
|
brew install siderolabs/tap/talosctl
|
||||||
|
talosctl cluster create --workers 3
|
||||||
|
talosctl dashboard --nodes 10.5.0.2
|
||||||
|
|
||||||
|
talosctl --context talos-default kubeconfig ~/.kube/talos-default.yaml --nodes 10.5.0.2
|
||||||
|
```
|
||||||
|
|
||||||
## Генерация и установка
|
## Генерация и установка
|
||||||
|
|
||||||
эту часть делает ренератор generator.sh
|
эту часть делает ренератор generator.sh
|
||||||
|
Reference in New Issue
Block a user