Last active
December 27, 2022 11:10
-
-
Save josecastillolema/c050c78e46b4a963bbf8dbf3f4213d7c to your computer and use it in GitHub Desktop.
OCM start/cleanup scripts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
kind delete cluster --name cluster1 | |
kind delete cluster --name hub |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
kind create cluster --name hub | |
kind create cluster --name cluster1 | |
clusteradm init --wait --context kind-hub | |
OUTPUT=$(clusteradm get token --context kind-hub | tail -1) | |
JOIN_COMMAND=$(echo $OUTPUT | sed 's/<cluster_name>/cluster1/') | |
eval "$JOIN_COMMAND --force-internal-endpoint-lookup --context kind-cluster1" | |
sleep 60 | |
clusteradm accept --clusters cluster1 --context kind-hub | |
sleep 2 | |
kubectl get managedcluster --context kind-hub | |
kubectx kind-hub |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment