Merge "Restore using IP as Apiserver address"
authorTrevor Tao <trevor.tao@arm.com>
Tue, 12 Apr 2022 12:02:00 +0000 (12:02 +0000)
committerGerrit Code Review <gerrit@akraino.org>
Tue, 12 Apr 2022 12:02:00 +0000 (12:02 +0000)
src/foundation/scripts/k8s_master.sh

index 13b76cd..337209d 100755 (executable)
@@ -24,14 +24,14 @@ fi
 
 if ! kubectl get nodes --request-timeout=3s; then
   sudo kubeadm config images pull
-  #sudo kubeadm init \
-  #  --pod-network-cidr="${POD_NETWORK_CIDR}" \
-  #  --apiserver-advertise-address="${MGMT_IP}" \
-  #  --service-cidr="${SERVICE_CIDR}"
   sudo kubeadm init \
     --pod-network-cidr="${POD_NETWORK_CIDR}" \
-    --apiserver-advertise-address="${MGMT_HOST}" \
+    --apiserver-advertise-address="${MGMT_IP}" \
     --service-cidr="${SERVICE_CIDR}"
+  #sudo kubeadm init \
+  #  --pod-network-cidr="${POD_NETWORK_CIDR}" \
+  #  --apiserver-advertise-address="${MGMT_HOST}" \
+  #  --service-cidr="${SERVICE_CIDR}"
 
   if [ "$(id -u)" = 0 ]; then
     echo "export KUBECONFIG=/etc/kubernetes/admin.conf" | \