hundreds-state-15112
05/11/2023, 5:16 PMhandsome-autumn-77266
05/12/2023, 3:13 PMhandsome-autumn-77266
05/12/2023, 3:15 PMadorable-engine-54231
05/16/2023, 8:28 AMmammoth-winter-72426
05/17/2023, 2:11 PMmammoth-winter-72426
05/17/2023, 11:54 PMbillowy-smartphone-2833
05/18/2023, 7:56 AMbig-judge-33880
05/19/2023, 6:38 AMmammoth-battery-28500
05/20/2023, 8:58 PMbumpy-glass-83711
05/21/2023, 6:28 PMconnection error: Get <https://74.220.22.141:6443/api?timeout=32s>: tls: failed to verify certificate: x509: certificate is valid for 10.43.0.1, 127.0.0.1, 192.168.1.3, 192.168.1.4, 192.168.1.5, 192.168.1.6, ::1, not 74.220.22.141
Unable to connect to the server: tls: failed to verify certificate: x509: certificate is valid for 10.43.0.1, 127.0.0.1, 192.168.1.3, 192.168.1.4, 192.168.1.5, 192.168.1.6, ::1, not 74.220.22.141
as These are running a VM in cloud platforms so public IP are dynamic here the 74.220.22.141 is the publicIP of loadbalancer
So the issue gets resolved when I pass in this command
kubectl cluster-info --insecure-skip-tls-verify
after that all the kubectl commands function normally
Here is the SHELL command I used to create the control plane with known loadbalancer privateIP
curl -sfL <https://get.k3s.io> | sh -s - server --node-taint CriticalAddonsOnly=true:NoExecute --tls-san 192.168.1.8
Here 192.168.1.8 is provateIP of lb
and to add additional controlplane nodes I used these commands
curl -sfL <https://get.k3s.io> | sh -s - server --token=$SECRET --node-taint CriticalAddonsOnly=true:NoExecute --tls-san 192.168.1.8
Here is the HA proxy config
cat <<EOF > /etc/haproxy/haproxy.cfg
frontend kubernetes-frontend
bind *:6443
mode tcp
option tcplog
timeout client 10s
default_backend kubernetes-backend
backend kubernetes-backend
timeout connect 10s
timeout server 10s
mode tcp
option tcp-check
balance roundrobin
server k3sserver1 <privateip>:6443
server k3sserver2 <privateip>:6443
EOF
bumpy-glass-83711
05/21/2023, 6:30 PMnewKubeconfig := strings.Replace(kubeconfig, "127.0.0.1", loadBalancer.PublicIP, 1)
bumpy-glass-83711
05/21/2023, 6:32 PM--tls-san
or --advertise-address
will be useful and what should be its value?bumpy-glass-83711
05/21/2023, 6:35 PMbillowy-smartphone-2833
05/22/2023, 7:59 AMbillowy-smartphone-2833
05/22/2023, 10:44 AMcreamy-pencil-82913
05/22/2023, 5:46 PMcreamy-pencil-82913
05/22/2023, 5:47 PMfamous-pharmacist-61387
05/23/2023, 10:40 AMmammoth-winter-72426
05/23/2023, 3:56 PMadorable-toddler-38962
05/24/2023, 3:57 AMhandsome-receptionist-60256
05/24/2023, 9:36 AMadorable-toddler-38962
05/24/2023, 2:20 PMcreamy-room-58344
05/24/2023, 9:09 PMfancy-insurance-98888
05/25/2023, 2:23 AMbitter-tailor-6977
05/25/2023, 4:16 AMbitter-tailor-6977
05/25/2023, 4:30 AMMay 24 15:18:18 Demo-Box kernel: [1670655.742173] cni0: port 52(vethfa98589d) entered disabled state
May 24 15:18:18 Demo-Box kernel: [1670655.753874] device vethfa98589d left promiscuous mode
May 24 15:18:18 Demo-Box kernel: [1670655.753884] cni0: port 52(vethfa98589d) entered disabled state
May 24 15:18:21 Demo-Box kernel: [1670658.647720] IPv6: ADDRCONF(NETDEV_UP): veth6e07cfbf: link is not ready
May 24 15:18:21 Demo-Box kernel: [1670658.648223] cni0: port 52(veth6e07cfbf) entered blocking state
May 24 15:18:21 Demo-Box kernel: [1670658.648226] cni0: port 52(veth6e07cfbf) entered disabled state
May 24 15:18:21 Demo-Box kernel: [1670658.648402] device veth6e07cfbf entered promiscuous mode
May 24 15:18:21 Demo-Box kernel: [1670658.653907] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
May 24 15:18:21 Demo-Box kernel: [1670658.653935] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
May 24 15:18:21 Demo-Box kernel: [1670658.653997] IPv6: ADDRCONF(NETDEV_CHANGE): veth6e07cfbf: link becomes ready
May 24 15:18:21 Demo-Box kernel: [1670658.654068] cni0: port 52(veth6e07cfbf) entered blocking state
May 24 15:18:21 Demo-Box kernel: [1670658.654070] cni0: port 52(veth6e07cfbf) entered forwarding state
May 24 15:21:19 Demo-Box kernel: [1670836.700175] nfs: server 10.43.252.141 not responding, still trying
May 24 15:21:35 Demo-Box kernel: [1670852.252148] nfs: server 10.43.65.88 not responding, still trying
May 24 15:21:39 Demo-Box kernel: [1670856.860416] nfs: server 10.43.252.141 not responding, still trying
May 24 15:21:55 Demo-Box kernel: [1670872.284298] nfs: server 10.43.174.157 not responding, timed out
May 24 15:21:55 Demo-Box kernel: [1670872.408142] nfs: server 10.43.65.88 not responding, timed out
May 24 15:21:56 Demo-Box kernel: [1670872.988271] nfs: server 10.43.252.141 not responding, timed out
May 24 15:22:03 Demo-Box kernel: [1670880.476079] nfs: server 10.43.65.88 not responding, still trying
May 24 15:22:56 Demo-Box kernel: [1670933.724423] nfs: server 10.43.174.157 not responding, still trying
May 24 15:23:49 Demo-Box kernel: [1670986.717866] INFO: task influxd:27866 blocked for more than 120 seconds.
on the same time we found k3s logs as below,
please anyone help on this, much appreciateflat-bird-89111
05/25/2023, 9:51 AMetcdctl get --prefix --keys-only /registry/pods
, and it returns me 7 pods. When I get pods via kubectl across all namespaces, it gives me 8 pods. And the pods’ names don’t match.bitter-tailor-6977
05/25/2023, 3:51 PMadorable-toddler-38962
05/25/2023, 5:40 PMlimited-iron-69701
05/25/2023, 7:18 PM