mirror of
https://github.com/khuedoan/homelab.git
synced 2025-01-05 21:11:52 +07:00
Use clusterctl config file in bootstrap script
This commit is contained in:
parent
fb3c6abf25
commit
1540f9da1a
@ -4,30 +4,29 @@ set -e
|
||||
|
||||
# DHCP server
|
||||
|
||||
export PUBLIC_IP="192.168.1.19"
|
||||
|
||||
talosctl cluster create \
|
||||
-p 69:69/udp,8081:8081/tcp \
|
||||
--workers 0 \
|
||||
--endpoint $PUBLIC_IP
|
||||
--endpoint '192.168.1.19'
|
||||
|
||||
kubectl taint node talos-default-master-1 node-role.kubernetes.io/master:NoSchedule-
|
||||
|
||||
SIDERO_CONTROLLER_MANAGER_HOST_NETWORK=true \
|
||||
SIDERO_CONTROLLER_MANAGER_API_ENDPOINT=$PUBLIC_IP \
|
||||
SIDERO_CONTROLLER_MANAGER_AUTO_ACCEPT_SERVERS=true \
|
||||
clusterctl init -b talos -c talos -i sidero
|
||||
clusterctl init -b talos -c talos -i sidero --config clusterctl.yaml
|
||||
|
||||
wol '00:23:24:d1:f3:f0'
|
||||
# wol '00:23:24:d1:f4:d6'
|
||||
# wol '00:23:24:d1:f5:69'
|
||||
# wol '00:23:24:e7:04:60'
|
||||
|
||||
kubectl apply -f serverclasses
|
||||
|
||||
# Wait for servers to register
|
||||
|
||||
sleep 30
|
||||
|
||||
kubectl apply -f serverclasses
|
||||
kubectl apply -f servers
|
||||
kubectl apply -f clusters
|
||||
clusterctl config cluster management-plane -i sidero --config clusterctl.yaml > cluster/management-plane.yaml
|
||||
|
||||
wol '00:23:24:d1:f3:f0'
|
||||
wol '00:23:24:d1:f4:d6'
|
||||
wol '00:23:24:d1:f5:69'
|
||||
wol '00:23:24:e7:04:60'
|
||||
kubectl apply -f cluster/
|
||||
|
||||
kubectl get talosconfig \
|
||||
-l cluster.x-k8s.io/cluster-name=management-plane \
|
||||
|
@ -81,7 +81,7 @@ metadata:
|
||||
namespace: default
|
||||
spec:
|
||||
clusterName: management-plane
|
||||
replicas: 3
|
||||
replicas: 0
|
||||
selector:
|
||||
matchLabels: null
|
||||
template:
|
||||
|
Loading…
Reference in New Issue
Block a user