(Linkerd lab 7.2 issue) Pods in worker node unable to access Cluster IP for kube-api in CP
Installing linkerd fails if i have the worker node online, if i take it offline and install linkerd the pods deploy to the master node and all pods start
After some testing, the problem seems to be with any pod started up on the worker node not being able to access the clusterip for the kube-api service
I tested this by creating a deployment of 3 nodes then using telnet, telnet the kube-api
on port 443 using cluster ip from a pod being scheduled on the worker node fails
cp established a connection.
its worth noting that i can telnet to other cluster ip's from pods on the worker node
Service IPs
ckanode2:~$ kubectl get svc
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
kubernetes ClusterIP 10.96.0.1 443/TCP 126d
nginx ClusterIP 10.108.223.73 443/TCP 118d
registry ClusterIP 10.98.29.147 5000/TCP 118d
Calico Block Affinities
ckanode1:~/app2$ kubectl describe blockaffinities.crd.projectcalico.org | egrep "Name:|Cidr|Node"
Name: ckanode2-192-168-85-192-26
Cidr: 192.168.85.192/26
Node: ckanode2
Name: cp-192-168-242-64-26
Cidr: 192.168.242.64/26
Node: cp
Linkerd Pod Errors
ckanode2:~$ kubectl logs -f linkerd-identity-68f44dcc9b-pbz69 -n linkerd identity
time="2022-07-03T08:55:31Z" level=info msg="running version stable-2.11.2"
time="2022-07-03T08:56:01Z" level=fatal msg="Failed to initialize identity service: Post \"https://10.96.0.1:443/apis/authorization.k8s.io/v1/selfsubjectaccessreviews\": dial tcp 10.96.0.1:443: i/o timeout"
ckanode2:~$ kubectl logs -f -n linkerd linkerd-proxy-injector-5998bcd56-dh6h9 -c linkerd-proxy
time="2022-07-03T08:57:39Z" level=info msg="Found pre-existing key: /var/run/linkerd/identity/end-entity/key.p8"
time="2022-07-03T08:57:39Z" level=info msg="Found pre-existing CSR: /var/run/linkerd/identity/end-entity/csr.der"
[ 0.000486s] INFO ThreadId(01) linkerd2_proxy::rt: Using single-threaded proxy runtime
[ 0.000726s] INFO ThreadId(01) linkerd2_proxy: Admin interface on 0.0.0.0:4191
[ 0.000736s] INFO ThreadId(01) linkerd2_proxy: Inbound interface on 0.0.0.0:4143
[ 0.000738s] INFO ThreadId(01) linkerd2_proxy: Outbound interface on 127.0.0.1:4140
[ 0.000741s] INFO ThreadId(01) linkerd2_proxy: Tap DISABLED
[ 0.000742s] INFO ThreadId(01) linkerd2_proxy: Local identity is linkerd-proxy-injector.linkerd.serviceaccount.identity.linkerd.cluster.local
[ 0.000744s] INFO ThreadId(01) linkerd2_proxy: Identity verified via linkerd-identity-headless.linkerd.svc.cluster.local:8080 (linkerd-identity.linkerd.serviceaccount.identity.linkerd.cluster.local)
[ 0.000748s] INFO ThreadId(01) linkerd2_proxy: Destinations resolved via linkerd-dst-headless.linkerd.svc.cluster.local:8086 (linkerd-destination.linkerd.serviceaccount.identity.linkerd.cluster.local)
[ 0.001833s] WARN ThreadId(01) policy:watch{port=4191}:controller{addr=linkerd-policy.linkerd.svc.cluster.local:8090}: linkerd_app_core::control: Failed to resolve control-plane component error=no record found for name: linkerd-policy.linkerd.svc.cluster.local. type: SRV class: IN
Comments
-
Hi @blambo10,
What type of infrastructure are you using for your cluster, and how did you provision and bootstrap the cluster? Have you noticed such behaviors in earlier lab exercises?
Regards,
-Chris0 -
Hi Chris,
Im using the Virtual Machine approach, running two ubuntu VMs within virtual box on a windows pc,
I have configured them both to use the bridge adapter and disabled configured the box's appropriately as per the guide.I leveraged the scripts in the guide to bootstrap the CP then to bootstrap the Worker.
I dont recall hitting any other issues during the lab exercises like this, for the most part the pods work on either node, except when an attempt is made to call the api service from within a pod on the worker node it seems.
Thanks,
Bryce0 -
Hi @blambo10,
VirtualBox VMs are often causing networking issues when the default DHCP configuration is used.
Is the promiscuous mode set to allow all on each VM's bridged adapter?
What are the IP addresses of the VMs/nodes? This can be retrieved with
kubectl get nodes -o wide
What pod subnet is defined by the Calico network plugin? This can be retrieved from the calico.yaml file and from the kubeadm.yaml file.
Regards,
-Chris0 -
Hi @chrispokorni,
Both VMs have the IP's configured statically.
Promiscuous MODE
Both VMs have the bridge adapters configured with promiscuous
Node IPs
bryce@ckanode1:~$ kubectl get nodes -o wide
NAME STATUS ROLES AGE VERSION INTERNAL-IP CONTAINER-RUNTIME ckanode2 Ready <none> 129d v1.23.1 192.168.1.241 cri-o://1.23.1 cp Ready control-plane,master 130d v1.23.4 192.168.1.237 cri-o://1.23.1
kubadm-config
ckanode1:~/debugging$ cat kubeadm-config.yaml
apiVersion: v1 data: ClusterConfiguration: | apiServer: extraArgs: authorization-mode: Node,RBAC timeoutForControlPlane: 4m0s apiVersion: kubeadm.k8s.io/v1beta3 certificatesDir: /etc/kubernetes/pki clusterName: kubernetes controllerManager: {} dns: {} etcd: local: dataDir: /var/lib/etcd imageRepository: k8s.gcr.io kind: ClusterConfiguration kubernetesVersion: v1.23.1 networking: dnsDomain: cluster.local podSubnet: 192.168.0.0/16 serviceSubnet: 10.96.0.0/12 scheduler: {} kind: ConfigMap metadata: creationTimestamp: "2022-02-27T03:30:39Z" name: kubeadm-config namespace: kube-system resourceVersion: "208" uid: aa597570-d12c-4907-9412-80004bfe04db
calico.yaml
Im not entirely sure what "calico.yaml" is as it is installed via the scripts provided
it creates alot of CRDs,
Any guidance on specifics here would be appreciated.ckanode1:~/debugging$ kubectl get crd | grep calico
bgpconfigurations.crd.projectcalico.org 2022-02-27T03:30:51Z bgppeers.crd.projectcalico.org 2022-02-27T03:30:51Z blockaffinities.crd.projectcalico.org 2022-02-27T03:30:51Z caliconodestatuses.crd.projectcalico.org 2022-02-27T03:30:51Z clusterinformations.crd.projectcalico.org 2022-02-27T03:30:51Z felixconfigurations.crd.projectcalico.org 2022-02-27T03:30:51Z globalnetworkpolicies.crd.projectcalico.org 2022-02-27T03:30:51Z globalnetworksets.crd.projectcalico.org 2022-02-27T03:30:51Z hostendpoints.crd.projectcalico.org 2022-02-27T03:30:51Z ipamblocks.crd.projectcalico.org 2022-02-27T03:30:51Z ipamconfigs.crd.projectcalico.org 2022-02-27T03:30:51Z ipamhandles.crd.projectcalico.org 2022-02-27T03:30:51Z ippools.crd.projectcalico.org 2022-02-27T03:30:51Z ipreservations.crd.projectcalico.org 2022-02-27T03:30:51Z kubecontrollersconfigurations.crd.projectcalico.org 2022-02-27T03:30:51Z networkpolicies.crd.projectcalico.org 2022-02-27T03:30:51Z networksets.crd.projectcalico.org 2022-02-27T03:30:51Z
Thanks,
Bryce0 -
Hi @blambo10,
Thank you for all the detailed outputs. There are several aspects of the cluster that are of concern.
Mismatching Kubernetes versions between the two nodes (unless you are going through the cluster upgrade process, and the worker node upgrade is to follow...)
If Calico is used with default pod network, matching the podSubnet 192.168.0.0/16 from the kubeadm-config.yaml file, then the pod network overlaps the VM/node IP addresses 192.168.1.x. In such cases, routing within the cluster will be impacted.
The recommendation is to bootstrap a new cluster and ensure the hypervisor assigned IP addresses of your VMs/nodes do not overlap the default pod network managed by the Calico network plugin. Also, ensure all nodes run the same Kubernetes version.
Regards,
-Chris0 -
Hi @chrispokorni,
Now you've pointed that out its quite obvious.
ckanode1:~/app2$ kubectl describe blockaffinities.crd.projectcalico.org | egrep "Name:|Cidr|Node"
Name: ckanode2-192-168-85-192-26 Cidr: 192.168.85.192/26 Node: ckanode2 Name: cp-192-168-242-64-26 Cidr: 192.168.242.64/26 Node: cp
While previously checking i must not have been thinking properly and completely missed the /16 on the mask, second pair of eyes always helps.
I was going to ask if there was a way to modify the calico ip pools without recreating the cluster,
as per comments found in the installation yaml on https://projectcalico.docs.tigera.io/networking/change-block-size seems not# Configures Calico networking. calicoNetwork: # Note: The ipPools section cannot be modified post-install.
Thanks for your help its been greatly appreciated.
Thanks,
Bryce0 -
Hi @blambo10,
I would follow the Note you quoted from the Calico documentation, and build a new cluster with the desired subnets. There may be articles or blog posts outlining quick and dirty ways to update properties of a live cluster, but chances are that down the road they will come back to haunt you.
Regards,
-Chris0 -
Hi @chrispokorni,
Yes i avoided trying to fix the broken cluster and simply rebuilt it.
I ended up choosing to download the calico.yaml and updating the "calico-node" env vars,
aswell as updating the kubeadm.yaml pod subnet changing it from 192.16.0.0/26 to 172.16.0.0kubeadm.yaml
kind: ClusterConfiguration kubernetesVersion: 1.24.2 networking: dnsDomain: cluster.local serviceSubnet: 10.96.0.0/12 podSubnet: 172.16.0.0/16
calico.yaml (calico-node) container env
1. - name: CALICO_IPV4POOL_CIDR 2. value: "172.16.0.0/16"
I assume calico config negates the podsubnet set in kubeadm,
Though i just set both to be safe.My problem with linkerd has now been resolved,
Below illustrates the linkerd pods starting on the worker nodeckad-cp:~$ kubectl get pods -n linkerd -o wide NAME READY STATUS RESTARTS AGE IP NODE linkerd-destination-5c5686697d-rn2pc 4/4 Running 0 16m 172.16.108.68 ckad-worker.thelabshack.com linkerd-identity-778bd797b9-8fc6h 2/2 Running 0 16m 172.16.108.67 ckad-worker.thelabshack.com linkerd-proxy-injector-84bcc448cd-tlzts 2/2 Running 0 16m 172.16.108.69 ckad-worker.thelabshack.com
Thanks,
Bryce0 -
Hi @blambo10,
Though i just set both to be safe.
Setting both is the recommended course of action
Glad the service mesh is running now!
Regards,
-Chris0
Categories
- All Categories
- 167 LFX Mentorship
- 219 LFX Mentorship: Linux Kernel
- 798 Linux Foundation IT Professional Programs
- 356 Cloud Engineer IT Professional Program
- 180 Advanced Cloud Engineer IT Professional Program
- 82 DevOps Engineer IT Professional Program
- 149 Cloud Native Developer IT Professional Program
- 112 Express Training Courses
- 138 Express Courses - Discussion Forum
- 6.2K Training Courses
- 48 LFC110 Class Forum - Discontinued
- 17 LFC131 Class Forum
- 35 LFD102 Class Forum
- 227 LFD103 Class Forum
- 19 LFD110 Class Forum
- 39 LFD121 Class Forum
- 15 LFD133 Class Forum
- 7 LFD134 Class Forum
- 17 LFD137 Class Forum
- 63 LFD201 Class Forum
- 3 LFD210 Class Forum
- 5 LFD210-CN Class Forum
- 2 LFD213 Class Forum - Discontinued
- 128 LFD232 Class Forum - Discontinued
- 1 LFD233 Class Forum
- 2 LFD237 Class Forum
- 23 LFD254 Class Forum
- 697 LFD259 Class Forum
- 109 LFD272 Class Forum
- 3 LFD272-JP クラス フォーラム
- 10 LFD273 Class Forum
- 154 LFS101 Class Forum
- 1 LFS111 Class Forum
- 1 LFS112 Class Forum
- 1 LFS116 Class Forum
- 1 LFS118 Class Forum
- LFS120 Class Forum
- 7 LFS142 Class Forum
- 7 LFS144 Class Forum
- 3 LFS145 Class Forum
- 1 LFS146 Class Forum
- 3 LFS147 Class Forum
- 1 LFS148 Class Forum
- 15 LFS151 Class Forum
- 1 LFS157 Class Forum
- 34 LFS158 Class Forum
- 8 LFS162 Class Forum
- 1 LFS166 Class Forum
- 1 LFS167 Class Forum
- 3 LFS170 Class Forum
- 2 LFS171 Class Forum
- 1 LFS178 Class Forum
- 1 LFS180 Class Forum
- 1 LFS182 Class Forum
- 1 LFS183 Class Forum
- 29 LFS200 Class Forum
- 736 LFS201 Class Forum - Discontinued
- 2 LFS201-JP クラス フォーラム
- 14 LFS203 Class Forum
- 102 LFS207 Class Forum
- 1 LFS207-DE-Klassenforum
- 1 LFS207-JP クラス フォーラム
- 301 LFS211 Class Forum
- 55 LFS216 Class Forum
- 48 LFS241 Class Forum
- 48 LFS242 Class Forum
- 37 LFS243 Class Forum
- 15 LFS244 Class Forum
- LFS245 Class Forum
- LFS246 Class Forum
- 50 LFS250 Class Forum
- 1 LFS250-JP クラス フォーラム
- LFS251 Class Forum
- 155 LFS253 Class Forum
- LFS254 Class Forum
- LFS255 Class Forum
- 5 LFS256 Class Forum
- 1 LFS257 Class Forum
- 1.3K LFS258 Class Forum
- 10 LFS258-JP クラス フォーラム
- 121 LFS260 Class Forum
- 159 LFS261 Class Forum
- 41 LFS262 Class Forum
- 82 LFS263 Class Forum - Discontinued
- 15 LFS264 Class Forum - Discontinued
- 11 LFS266 Class Forum - Discontinued
- 20 LFS267 Class Forum
- 25 LFS268 Class Forum
- 31 LFS269 Class Forum
- 1 LFS270 Class Forum
- 199 LFS272 Class Forum
- 1 LFS272-JP クラス フォーラム
- LFS274 Class Forum
- 3 LFS281 Class Forum
- 10 LFW111 Class Forum
- 261 LFW211 Class Forum
- 182 LFW212 Class Forum
- 15 SKF100 Class Forum
- 1 SKF200 Class Forum
- 1 SKF201 Class Forum
- 782 Hardware
- 198 Drivers
- 68 I/O Devices
- 37 Monitors
- 96 Multimedia
- 174 Networking
- 91 Printers & Scanners
- 83 Storage
- 758 Linux Distributions
- 80 Debian
- 67 Fedora
- 15 Linux Mint
- 13 Mageia
- 23 openSUSE
- 143 Red Hat Enterprise
- 31 Slackware
- 13 SUSE Enterprise
- 348 Ubuntu
- 461 Linux System Administration
- 39 Cloud Computing
- 70 Command Line/Scripting
- Github systems admin projects
- 90 Linux Security
- 77 Network Management
- 101 System Management
- 46 Web Management
- 64 Mobile Computing
- 17 Android
- 34 Development
- 1.2K New to Linux
- 1K Getting Started with Linux
- 371 Off Topic
- 114 Introductions
- 174 Small Talk
- 19 Study Material
- 806 Programming and Development
- 304 Kernel Development
- 204 Software Development
- 1.8K Software
- 211 Applications
- 180 Command Line
- 3 Compiling/Installing
- 405 Games
- 309 Installation
- 97 All In Program
- 97 All In Forum
Upcoming Training
-
August 20, 2018
Kubernetes Administration (LFS458)
-
August 20, 2018
Linux System Administration (LFS301)
-
August 27, 2018
Open Source Virtualization (LFS462)
-
August 27, 2018
Linux Kernel Debugging and Security (LFD440)