aula-07 e aula-08: Cluster Talos HA na Hetzner com Autoscaler
aula-07: Criação de imagem Talos customizada na Hetzner Cloud - Usa Talos Factory para gerar imagem ARM64/AMD64 - Inclui extensões: qemu-guest-agent, hcloud aula-08: Provisionamento de cluster Kubernetes Talos via OpenTofu - 3 Control Planes em HA (CAX11 ARM64) - 1 Worker Node (CAX11 ARM64) - Rede privada, Floating IP, Firewall - Cluster Autoscaler para Hetzner (0-5 workers extras) - Setup interativo com validação de pré-requisitos - Custo estimado: ~€18/mês (base) Também inclui: - .gitignore para ignorar arquivos sensíveis - CLAUDE.md com instruções do projeto
This commit is contained in:
63
aula-08/talos-patches/control-plane.yaml
Normal file
63
aula-08/talos-patches/control-plane.yaml
Normal file
@@ -0,0 +1,63 @@
|
||||
# Talos Control Plane Configuration Patch
|
||||
# Base configuration for HA control plane
|
||||
machine:
|
||||
# Network configuration for Floating IP
|
||||
network:
|
||||
interfaces:
|
||||
- interface: eth0
|
||||
dhcp: true
|
||||
%{ if is_first_cp ~}
|
||||
addresses:
|
||||
- ${floating_ip}/32
|
||||
%{ endif ~}
|
||||
|
||||
# Network optimizations
|
||||
sysctls:
|
||||
net.core.somaxconn: "8192"
|
||||
net.ipv4.tcp_max_syn_backlog: "8192"
|
||||
net.core.netdev_max_backlog: "5000"
|
||||
net.ipv4.ip_local_port_range: "1024 65535"
|
||||
net.ipv4.tcp_tw_reuse: "1"
|
||||
net.ipv4.tcp_fin_timeout: "15"
|
||||
fs.file-max: "2097152"
|
||||
fs.inotify.max_user_watches: "524288"
|
||||
vm.max_map_count: "262144"
|
||||
|
||||
# Kubelet configuration
|
||||
kubelet:
|
||||
extraArgs:
|
||||
max-pods: "110"
|
||||
kube-reserved: "cpu=200m,memory=300Mi"
|
||||
system-reserved: "cpu=200m,memory=200Mi"
|
||||
|
||||
# Time sync
|
||||
time:
|
||||
servers:
|
||||
- ntp1.hetzner.de
|
||||
- ntp2.hetzner.com
|
||||
- ntp3.hetzner.net
|
||||
|
||||
# Features
|
||||
features:
|
||||
rbac: true
|
||||
stableHostname: true
|
||||
|
||||
cluster:
|
||||
# Control plane configuration
|
||||
controlPlane:
|
||||
endpoint: https://${floating_ip}:6443
|
||||
|
||||
# Network configuration
|
||||
network:
|
||||
cni:
|
||||
name: flannel
|
||||
dnsDomain: cluster.local
|
||||
serviceSubnets:
|
||||
- 10.96.0.0/12
|
||||
podSubnets:
|
||||
- 10.244.0.0/16
|
||||
|
||||
# Etcd configuration for HA
|
||||
etcd:
|
||||
advertisedSubnets:
|
||||
- 10.0.1.0/24
|
||||
Reference in New Issue
Block a user