Compare commits
2 Commits
4683b48d24
...
14dc5be114
| Author | SHA1 | Date | |
|---|---|---|---|
|
14dc5be114
|
|||
|
f060080694
|
1
.gitattributes
vendored
Normal file
1
.gitattributes
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
secrets.yaml filter=git-crypt diff=git-crypt
|
||||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1,2 +1,3 @@
|
|||||||
.ipxe/
|
.ipxe/
|
||||||
rendered/
|
rendered/
|
||||||
|
configs/
|
||||||
|
|||||||
67
README.md
Normal file
67
README.md
Normal file
@@ -0,0 +1,67 @@
|
|||||||
|
# Talos
|
||||||
|
|
||||||
|
To decrypt the secrets file:
|
||||||
|
|
||||||
|
```
|
||||||
|
git-crypt unlock
|
||||||
|
```
|
||||||
|
|
||||||
|
Generate the config files:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
talosctl gen config <cluster_name> https://<controlplane_ip>:6443 -f \
|
||||||
|
--with-secrets secrets.yaml \
|
||||||
|
--config-patch @<path_to_patch> \
|
||||||
|
--config-patch-control-plane @<path_to_controlplane_patch> \
|
||||||
|
--install-image factory.talos.dev/metal-installer/<schematic_id>:<version> \
|
||||||
|
-o configs
|
||||||
|
```
|
||||||
|
|
||||||
|
Set TALOSCONFIG:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
export TALOSCONFIG=$(realpath configs/talosconfig)
|
||||||
|
```
|
||||||
|
|
||||||
|
Apply the configs for each node, use worker.yaml for worker nodes:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
talosctl apply-config --insecure --nodes <node_id> --file configs/controlplane.yaml
|
||||||
|
```
|
||||||
|
|
||||||
|
Set endpoint to one of the nodes:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
talosctl config endpoint <node_ip>
|
||||||
|
```
|
||||||
|
|
||||||
|
Bootstrap Kubernetes:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
talosctl -n <node_id> bootstrap
|
||||||
|
```
|
||||||
|
|
||||||
|
Set endpoint to control plane:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
talosctl config endpoint <controlplane_ip>
|
||||||
|
```
|
||||||
|
|
||||||
|
Get kubeconfig and set KUBECONFIG:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
talosctl -n 192.168.1.100 kubeconfig $PWD/configs/kubeconfig
|
||||||
|
export KUBECONFIG=$(realpath configs/kubeconfig)
|
||||||
|
```
|
||||||
|
|
||||||
|
For applying updated config to node:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
talosctl apply-config --nodes <node_id> --file configs/controlplane.yaml
|
||||||
|
```
|
||||||
|
|
||||||
|
Upgrading talos or changing the schematic:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
talosctl upgrade --nodes <node_id> --image factory.talos.dev/metal-installer/<schematic_id>:<version>
|
||||||
|
```
|
||||||
3
patches/allow-controlplane-workloads.yaml
Normal file
3
patches/allow-controlplane-workloads.yaml
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
---
|
||||||
|
cluster:
|
||||||
|
allowSchedulingOnControlPlanes: true
|
||||||
4
patches/hostname.yaml
Normal file
4
patches/hostname.yaml
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
---
|
||||||
|
machine:
|
||||||
|
network:
|
||||||
|
hostname: talos-vm
|
||||||
4
patches/install-disk.yaml
Normal file
4
patches/install-disk.yaml
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
---
|
||||||
|
machine:
|
||||||
|
install:
|
||||||
|
disk: /dev/vda
|
||||||
11
patches/network.yaml
Normal file
11
patches/network.yaml
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
---
|
||||||
|
machine:
|
||||||
|
network:
|
||||||
|
interfaces:
|
||||||
|
- interface: eth0
|
||||||
|
dhcp: false
|
||||||
|
addresses:
|
||||||
|
- 192.168.1.2
|
||||||
|
routes:
|
||||||
|
- network: 0.0.0.0/0
|
||||||
|
gateway: 192.168.1.1
|
||||||
7
patches/vip.yaml
Normal file
7
patches/vip.yaml
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
---
|
||||||
|
machine:
|
||||||
|
network:
|
||||||
|
interfaces:
|
||||||
|
- interface: eth0
|
||||||
|
vip:
|
||||||
|
ip: 192.168.1.100
|
||||||
BIN
secrets.yaml
Normal file
BIN
secrets.yaml
Normal file
Binary file not shown.
Reference in New Issue
Block a user