diff --git a/bootstrap/bootstrap.sh b/bootstrap/bootstrap.sh index 3e9e29e2..faa88bbc 100644 --- a/bootstrap/bootstrap.sh +++ b/bootstrap/bootstrap.sh @@ -35,4 +35,18 @@ export KUBERNETES_VERSION=v1.20.1 export CONTROL_PLANE_PORT=6443 export CONTROL_PLANE_ENDPOINT=192.168.1.24 clusterctl config cluster management-plane -i sidero > management-plane.yaml -kubectl delete -f management-plane.yaml + +kubectl apply -f management-plane.yaml + +kubectl get talosconfig \ + -l cluster.x-k8s.io/cluster-name=management-plane \ + -o yaml -o jsonpath='{.items[0].status.talosConfig}' > management-plane-talosconfig.yaml + +clusterctl init \ + --kubeconfig-context=admin@management-plane + -i sidero -b talos -c talos + +clusterctl move \ + --kubeconfig-context=admin@talos-default \ + --to-kubeconfig=$HOME/.kube/config \ + --to-kubeconfig-context=admin@management-plane