Timeout error when acquiring logs on Kubernetes with kubectl command

I'm creating a Kubernetes cluster using AWS EC2 instances. This cluster is composed of a single master node and two worker nodes. When I create my cluster suing kubeadm (command below) everything seems to be running okay. I'm using Calico as the CNI Plugin without moficiations to the one provided in their documentation. All pods start as expected once the CNI Plugin has been applied. CoreDNS and Calico Pods run as expected. However, when I execute the join command on the worker node a Calico pod is created for it, but said pod goes into 0/1 running state, which doesn't allow me to provision pods on the worker. When I try to get the logs on the master, the error below shows. This is the IP being used by the worker, is there anyway I can specify an external IP Address of my choosing? No kubeadm flag seem to help regarding that.

Error from server: Get "https://xxx.xx.xx.xx:10250/containerLogs/kube-system/calico-node-5p7x9/calico-node": dial tcp /xxx.xx.xx.xx:10250: i/o timeout

The issue is that the IP used to perform the GET request is Amazon's physical address, which of course we cannot use.

This is my kubeadm init command when creating the cluster:

kubeadm init --control-plane-endpoint=[OUR_IPV6] --pod-network-cidr= --kubernetes-version=1.21.0 --upload-certs

I was thinking that using --apiserver-advertise-address would solve the issue, but K8s gets funky with IPv6 addresses.

Read more here: https://stackoverflow.com/questions/67389428/timeout-error-when-acquiring-logs-on-kubernetes-with-kubectl-command

Content Attribution

This content was originally published by Nazar at Recent Questions - Stack Overflow, and is syndicated here via their RSS feed. You can read the original post over there.

%d bloggers like this: