Skip to content

Commit 6a4cbc3

Browse files
committed
Fixing LB issues
Signed-off-by: Lazar Cvetković <[email protected]>
1 parent 1d3b757 commit 6a4cbc3

File tree

4 files changed

+5
-10
lines changed

4 files changed

+5
-10
lines changed

configs/k8s_ha/check_apiserver.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ errorExit() {
55
exit 1
66
}
77

8-
curl --silent --max-time 2 --insecure https://localhost:8443/ -o /dev/null || errorExit "Error GET https://localhost:8443/"
8+
curl --silent --max-time 2 --insecure https://localhost:6443/ -o /dev/null || errorExit "Error GET https://localhost:6443/"
99
if ip addr | grep -q 10.0.1.254; then
10-
curl --silent --max-time 2 --insecure https://10.0.1.254:8443/ -o /dev/null || errorExit "Error GET https://10.0.1.254:8443/"
10+
curl --silent --max-time 2 --insecure https://10.0.1.254:6443/ -o /dev/null || errorExit "Error GET https://10.0.1.254:6443/"
1111
fi

configs/k8s_ha/haproxy.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ defaults
3232
# apiserver frontend which proxys to the control plane nodes
3333
#---------------------------------------------------------------------
3434
frontend apiserver
35-
bind *:8443
35+
bind *:6443
3636
mode tcp
3737
option tcplog
3838
default_backend apiserverbackend

configs/setup/kube.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@
99
"ApiserverDiscoveryToken": "",
1010
"ApiserverCertificateKey": "",
1111
"CPHAEndpoint": "10.0.1.254",
12-
"CPHAPort": "8443"
12+
"CPHAPort": "6443"
1313
}

scripts/cluster/create_multinode_cluster.go

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -103,16 +103,11 @@ EOF'`
103103
// Deploy Kubernetes
104104
func DeployKubernetes(haReplicaCount int) error {
105105
utils.WaitPrintf("Deploying Kubernetes(version %s)", configs.Kube.K8sVersion)
106-
masterNodeIp, iperr := utils.ExecShellCmd(`ip route | awk '{print $(NF)}' | awk '/^10\..*/'`)
107-
if iperr != nil {
108-
return iperr
109-
}
110106

111107
command := fmt.Sprintf(`sudo kubeadm init --v=%d \
112-
--apiserver-advertise-address=%s \
113108
--cri-socket /run/containerd/containerd.sock \
114109
--kubernetes-version %s \
115-
--pod-network-cidr="%s" `, configs.System.LogVerbosity, masterNodeIp, configs.Kube.K8sVersion, configs.Kube.PodNetworkCidr)
110+
--pod-network-cidr="%s" `, configs.System.LogVerbosity, configs.Kube.K8sVersion, configs.Kube.PodNetworkCidr)
116111

117112
if haReplicaCount > 0 {
118113
command += fmt.Sprintf(`\

0 commit comments

Comments
 (0)