mirror of
https://github.com/khuedoan/homelab.git
synced 2025-01-07 14:03:01 +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
|
# DHCP server
|
||||||
|
|
||||||
export PUBLIC_IP="192.168.1.19"
|
|
||||||
|
|
||||||
talosctl cluster create \
|
talosctl cluster create \
|
||||||
-p 69:69/udp,8081:8081/tcp \
|
-p 69:69/udp,8081:8081/tcp \
|
||||||
--workers 0 \
|
--workers 0 \
|
||||||
--endpoint $PUBLIC_IP
|
--endpoint '192.168.1.19'
|
||||||
|
|
||||||
kubectl taint node talos-default-master-1 node-role.kubernetes.io/master:NoSchedule-
|
kubectl taint node talos-default-master-1 node-role.kubernetes.io/master:NoSchedule-
|
||||||
|
|
||||||
SIDERO_CONTROLLER_MANAGER_HOST_NETWORK=true \
|
clusterctl init -b talos -c talos -i sidero --config clusterctl.yaml
|
||||||
SIDERO_CONTROLLER_MANAGER_API_ENDPOINT=$PUBLIC_IP \
|
|
||||||
SIDERO_CONTROLLER_MANAGER_AUTO_ACCEPT_SERVERS=true \
|
wol '00:23:24:d1:f3:f0'
|
||||||
clusterctl init -b talos -c talos -i sidero
|
# 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
|
sleep 30
|
||||||
|
|
||||||
kubectl apply -f serverclasses
|
clusterctl config cluster management-plane -i sidero --config clusterctl.yaml > cluster/management-plane.yaml
|
||||||
kubectl apply -f servers
|
|
||||||
kubectl apply -f clusters
|
|
||||||
|
|
||||||
wol '00:23:24:d1:f3:f0'
|
kubectl apply -f cluster/
|
||||||
wol '00:23:24:d1:f4:d6'
|
|
||||||
wol '00:23:24:d1:f5:69'
|
|
||||||
wol '00:23:24:e7:04:60'
|
|
||||||
|
|
||||||
kubectl get talosconfig \
|
kubectl get talosconfig \
|
||||||
-l cluster.x-k8s.io/cluster-name=management-plane \
|
-l cluster.x-k8s.io/cluster-name=management-plane \
|
||||||
|
@ -81,7 +81,7 @@ metadata:
|
|||||||
namespace: default
|
namespace: default
|
||||||
spec:
|
spec:
|
||||||
clusterName: management-plane
|
clusterName: management-plane
|
||||||
replicas: 3
|
replicas: 0
|
||||||
selector:
|
selector:
|
||||||
matchLabels: null
|
matchLabels: null
|
||||||
template:
|
template:
|
||||||
|
Loading…
Reference in New Issue
Block a user