mirror of
https://github.com/optim-enterprises-bv/terraform-talos.git
synced 2025-10-29 09:32:39 +00:00
update docs
This commit is contained in:
11
_deployments/vars/local-path-storage-ns.yaml
Normal file
11
_deployments/vars/local-path-storage-ns.yaml
Normal file
@@ -0,0 +1,11 @@
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: local-path-storage
|
||||
labels:
|
||||
pod-security.kubernetes.io/enforce: privileged
|
||||
pod-security.kubernetes.io/enforce-version: latest
|
||||
pod-security.kubernetes.io/audit: baseline
|
||||
pod-security.kubernetes.io/audit-version: latest
|
||||
pod-security.kubernetes.io/warn: baseline
|
||||
pod-security.kubernetes.io/warn-version: latest
|
||||
@@ -4,6 +4,7 @@ apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: local-path-provisioner
|
||||
namespace: local-path-storage
|
||||
labels:
|
||||
app.kubernetes.io/name: local-path-provisioner
|
||||
helm.sh/chart: local-path-provisioner-0.0.25-dev
|
||||
@@ -17,6 +18,7 @@ apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: local-path-config
|
||||
namespace: local-path-storage
|
||||
labels:
|
||||
app.kubernetes.io/name: local-path-provisioner
|
||||
helm.sh/chart: local-path-provisioner-0.0.25-dev
|
||||
@@ -51,9 +53,9 @@ data:
|
||||
spec:
|
||||
priorityClassName: system-node-critical
|
||||
tolerations:
|
||||
- key: node.kubernetes.io/disk-pressure
|
||||
operator: Exists
|
||||
effect: NoSchedule
|
||||
- key: node.kubernetes.io/disk-pressure
|
||||
operator: Exists
|
||||
effect: NoSchedule
|
||||
containers:
|
||||
- name: helper-pod
|
||||
image: busybox:latest
|
||||
@@ -127,6 +129,7 @@ apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: local-path-provisioner
|
||||
namespace: local-path-storage
|
||||
labels:
|
||||
app.kubernetes.io/name: local-path-provisioner
|
||||
helm.sh/chart: local-path-provisioner-0.0.25-dev
|
||||
|
||||
@@ -46,10 +46,9 @@ create-controlplane-bootstrap:
|
||||
talosctl --talosconfig _cfgs/talosconfig --nodes ${CPFIRST} bootstrap
|
||||
|
||||
create-controlplane: ## Bootstrap first controlplane node
|
||||
terraform apply -auto-approve -target=hcloud_server.controlplane
|
||||
terraform apply -auto-approve -target=hcloud_server.controlplane -target=null_resource.controlplane
|
||||
|
||||
create-infrastructure: ## Bootstrap all nodes
|
||||
cd modules/worker && terraform init
|
||||
terraform apply
|
||||
|
||||
create-kubeconfig: ## Prepare kubeconfig
|
||||
|
||||
@@ -37,41 +37,54 @@ Where:
|
||||
|
||||
Use packer (system_os/hetzner) to upload image.
|
||||
|
||||
## Create control plane lb
|
||||
## Create control plane
|
||||
|
||||
open config file **terraform.tfvars** and add params.
|
||||
|
||||
```hcl
|
||||
# counts and type of kubernetes master nodes
|
||||
controlplane = {
|
||||
count = 1,
|
||||
type = "cpx11"
|
||||
type_lb = ""
|
||||
}
|
||||
|
||||
# regions to use
|
||||
regions = ["nbg1", "fsn1", "hel1"]
|
||||
|
||||
# counts and type of worker nodes by redion
|
||||
# kubernetes control plane
|
||||
controlplane = {
|
||||
"all" = {
|
||||
type_lb = ""
|
||||
},
|
||||
|
||||
"nbg1" = {
|
||||
count = 1,
|
||||
type = "cpx21",
|
||||
},
|
||||
"fsn1" = {
|
||||
count = 1,
|
||||
type = "cpx21",
|
||||
},
|
||||
"hel1" = {
|
||||
count = 1,
|
||||
type = "cax21",
|
||||
}
|
||||
}
|
||||
|
||||
# Worker nodes by redion
|
||||
instances = {
|
||||
"nbg1" = {
|
||||
web_count = 0,
|
||||
web_instance_type = "cx11",
|
||||
worker_count = 0,
|
||||
worker_instance_type = "cx11",
|
||||
},
|
||||
"fsn1" = {
|
||||
web_count = 0,
|
||||
web_instance_type = "cx11",
|
||||
worker_count = 0,
|
||||
worker_instance_type = "cx11",
|
||||
}
|
||||
"hel1" = {
|
||||
web_count = 1,
|
||||
web_instance_type = "cx11",
|
||||
worker_count = 1,
|
||||
worker_instance_type = "cx11",
|
||||
}
|
||||
"nbg1" = {
|
||||
web_count = 0,
|
||||
web_type = "cx11",
|
||||
worker_count = 1,
|
||||
worker_type = "cpx11",
|
||||
},
|
||||
"fsn1" = {
|
||||
web_count = 0,
|
||||
web_type = "cx11",
|
||||
worker_count = 0,
|
||||
worker_type = "cpx11",
|
||||
}
|
||||
"hel1" = {
|
||||
web_count = 0,
|
||||
web_type = "cx21",
|
||||
worker_count = 0,
|
||||
worker_type = "cpx11",
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
@@ -96,8 +109,7 @@ make create-controlplane
|
||||
Bootstrap the first node
|
||||
|
||||
```shell
|
||||
talosctl --talosconfig _cfgs/talosconfig config endpoint $controlplane_firstnode
|
||||
talosctl --talosconfig _cfgs/talosconfig --nodes $controlplane_firstnode bootstrap
|
||||
make create-controlplane-bootstrap
|
||||
```
|
||||
|
||||
```shell
|
||||
@@ -115,7 +127,7 @@ make create-infrastructure
|
||||
Run server in [Rescue mode](https://docs.hetzner.com/robot/dedicated-server/troubleshooting/hetzner-rescue-system/).
|
||||
|
||||
```shell
|
||||
wget -O /tmp/metal-amd64.tar.gz https://github.com/siderolabs/talos/releases/download/v1.2.2/metal-amd64.tar.gz
|
||||
wget -O /tmp/metal-amd64.tar.gz https://github.com/siderolabs/talos/releases/download/v1.4.0/metal-amd64.tar.gz
|
||||
tar -Oxzf /tmp/talos-amd64.tar.gz > /dev/sda
|
||||
```
|
||||
|
||||
|
||||
@@ -119,6 +119,7 @@ cluster:
|
||||
- https://raw.githubusercontent.com/sergelogvinov/terraform-talos/main/hetzner/deployments/hcloud-csi.yaml
|
||||
- https://raw.githubusercontent.com/sergelogvinov/terraform-talos/main/hetzner/deployments/kubelet-serving-cert-approver.yaml
|
||||
- https://raw.githubusercontent.com/sergelogvinov/terraform-talos/main/_deployments/vars/metrics-server-result.yaml
|
||||
- https://raw.githubusercontent.com/sergelogvinov/terraform-talos/main/_deployments/vars/local-path-storage-ns.yaml
|
||||
- https://raw.githubusercontent.com/sergelogvinov/terraform-talos/main/_deployments/vars/local-path-storage-result.yaml
|
||||
- https://raw.githubusercontent.com/sergelogvinov/terraform-talos/main/_deployments/vars/coredns-local.yaml
|
||||
- https://raw.githubusercontent.com/sergelogvinov/terraform-talos/main/_deployments/vars/ingress-ns.yaml
|
||||
|
||||
Reference in New Issue
Block a user