mirror of
https://github.com/open-cluster-management-io/ocm.git
synced 2026-02-14 18:09:57 +00:00
🐛 fix the wrong endpoint issue of the multiple hubs hosted solution (#309)
Signed-off-by: Yang Le <yangle@redhat.com>
This commit is contained in:
@@ -13,6 +13,7 @@ The scripts provided in this doc help you to setup an Open Cluster Management (O
|
||||
|
||||
sudo chmod +x /usr/local/bin/clusteradm
|
||||
```
|
||||
Note: In order to run the scripts provided in this doc successfully, the clusteradm version must be > 0.7.1. You can also build it from the latest [source code](https://github.com/open-cluster-management-io/clusteradm) that contains the desired bug fixes.
|
||||
|
||||
## Setup the first hub cluster
|
||||
|
||||
|
||||
@@ -18,11 +18,11 @@ joincmd=$(clusteradm init --use-bootstrap-token | grep clusteradm)
|
||||
kubectl wait --for=condition=HubRegistrationDegraded=false clustermanager cluster-manager --timeout=60s
|
||||
|
||||
kubectl config use ${clusterctx}
|
||||
kubectl config view --flatten --minify | sed "s/127.0.0.1:[0-9]\{5\}/${cluster}-control-plane:6443/" > kubeconfig.${cluster}
|
||||
kubectl config view --flatten --minify > kubeconfig.${cluster}
|
||||
|
||||
kubectl config use ${hostingctx}
|
||||
echo "Join ${cluster} to ${hub}"
|
||||
$(echo ${joincmd} --singleton --force-internal-endpoint-lookup --mode hosted --managed-cluster-kubeconfig kubeconfig.${cluster} --wait | sed "s/<cluster_name>/$cluster/g")
|
||||
$(echo ${joincmd} --singleton --force-internal-endpoint-lookup --mode hosted --force-internal-endpoint-lookup-managed --managed-cluster-kubeconfig kubeconfig.${cluster} --wait | sed "s/<cluster_name>/$cluster/g")
|
||||
rm kubeconfig.${cluster}
|
||||
|
||||
kubectl config use ${hubctx}
|
||||
|
||||
Reference in New Issue
Block a user