File tree Expand file tree Collapse file tree 1 file changed +3
-16
lines changed
Expand file tree Collapse file tree 1 file changed +3
-16
lines changed Original file line number Diff line number Diff line change @@ -264,22 +264,9 @@ create_cluster(){
264264 log " cluster creation complete"
265265 fi
266266
267- log " wait for " ${CLUSTER_NAME} " cluster to stabilize"
268- timeout --foreground 300 bash -c " until kubectl get --raw /version --request-timeout 5s > /dev/null 2>&1; do sleep 3; done"
269-
270- CLUSTER_JSON=$( kubectl get cluster " ${CLUSTER_NAME} " -n default -o json || true)
271- if [[ -z " ${CLUSTER_JSON} " ]]; then
272- log " ERROR: failed to get cluster " ${CLUSTER_NAME} " in namespace default"
273- exit 1
274- fi
275- BASTION_ADDRESS=$( echo " ${CLUSTER_JSON} " | jq -r ' .spec.controlPlaneEndpoint.host // empty' )
276- if [[ -z " ${BASTION_ADDRESS} " ]]; then
277- log " ERROR: bastion address lookup failed for cluster"
278- echo " ${CLUSTER_JSON} "
279- exit 1
280- fi
281267 # set the SSH bastion that can be used to SSH into nodes
282- export KUBE_SSH_BASTION=" ${BASTION_ADDRESS} :22"
268+ KUBE_SSH_BASTION=$( kubectl get azurecluster -o json | jq ' .items[0].spec.networkSpec.apiServerLB.frontendIPs[0].publicIP.dnsName' | tr -d \" ) :22
269+ export KUBE_SSH_BASTION
283270 KUBE_SSH_USER=capi
284271 export KUBE_SSH_USER
285272 log " bastion info: $KUBE_SSH_USER @$KUBE_SSH_BASTION "
@@ -295,7 +282,7 @@ create_cluster(){
295282apply_workload_configuraiton (){
296283 log " wait for cluster to stabilize"
297284 timeout --foreground 300 bash -c " until kubectl get --raw /version --request-timeout 5s > /dev/null 2>&1; do sleep 3; done"
298-
285+
299286 log " installing calico"
300287 " $TOOLS_BIN_DIR " /helm repo add projectcalico https://docs.tigera.io/calico/charts
301288 kubectl create ns calico-system
You can’t perform that action at this time.
0 commit comments