Pivot to new cluster

This commit is contained in:
Khue Doan 2021-07-18 18:06:30 +07:00
parent 46fb7b03f3
commit 2eedf4932e
No known key found for this signature in database
GPG Key ID: 4C1A90A461B3C27B

View File

@ -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