Closed ittner closed 1 year ago
I think you can tweak the file /var/snap/microk8s/current/args/cni-network/cni.yaml
and try changing the IP detection method, the default is first_found
Example:
IP_AUTODETECTION_METHOD=interface=ibmveth.*
Hi @ittner
This looks like a bug in Calico itself, where autodetection method first-found
(the default in MicroK8s) will ignore any interfaces that include veth
in the name. I have created a PR in Calico that should fix the issue.
In the meantime, you can try the suggestion from balchua, or try a dev build image with the fix included:
sudo microk8s kubectl set image ds/calico-node -n kube-system calico-node=cdkbot/calico-node:v3.23.3-dev1-ppc64le
Thanks for reporting this! For more context, I was able to reproduce the issue on amd64 as well, so definitely not arch related.
This has now been fixed upstream with the release of Calico 3.24.3 https://github.com/projectcalico/calico/blob/v3.24.3/calico/_includes/release-notes/v3.24.3-release-notes.md
MicroK8s now comes with Calico 3.24.5, which includes the required fix. Closing the issue, thanks for reporting.
Summary
Calico, as deployed by microk8s v1.25.0 (from snap "edge" channel), does not work out of box with network interfaces named ibmveth* (ibmvetha, ibmvethb, etc). These are the default names for virtualized network interfaces in Power9 LPARs.
The problem goes away once the interface is renamed to any other recognized name (eth, enp, etc.);
What Should Happen Instead?
Networking should start automatically, as it does on other Power9 deployments (bare metal, kvm, etc.)
Reproduction Steps
Full log of the failure
ubuntu@p9g-lpar07:~$ microk8s start ubuntu@p9g-lpar07:~$ microk8s status --wait-ready microk8s is running high-availability: no datastore master nodes: 127.0.0.1:19001 datastore standby nodes: none addons: enabled: ha-cluster # (core) Configure high availability on the current node helm # (core) Helm - the package manager for Kubernetes helm3 # (core) Helm 3 - the package manager for Kubernetes disabled: cert-manager # (core) Cloud native certificate management community # (core) The community addons repository dashboard # (core) The Kubernetes dashboard dns # (core) CoreDNS host-access # (core) Allow Pods connecting to Host services smoothly hostpath-storage # (core) Storage class; allocates storage from host directory metallb # (core) Loadbalancer for your Kubernetes cluster metrics-server # (core) K8s Metrics Server for API access to service metrics rbac # (core) Role-Based Access Control for authorisation registry # (core) Private image registry exposed on localhost:32000 storage # (core) Alias to hostpath-storage add-on, deprecated ubuntu@p9g-lpar07:~$ microk8s kubectl get pods --all-namespaces NAMESPACE NAME READY STATUS RESTARTS AGE kube-system calico-kube-controllers-749975d956-nmkl4 0/1 ContainerCreating 0 17m kube-system calico-node-qvb47 0/1 CrashLoopBackOff 8 (54s ago) 17m ubuntu@p9g-lpar07:~$ ip addr 1: lo:Workaround by renaming the interface
ubuntu@p9g-lpar07:~$ ubuntu@p9g-lpar07:~$ ubuntu@p9g-lpar07:~$ ubuntu@p9g-lpar07:~$ ubuntu@p9g-lpar07:~$ sudo vim /etc/netplan/50-cloud-init.yaml ubuntu@p9g-lpar07:~$ cat /etc/netplan/50-cloud-init.yaml # This file is generated from information provided by the datasource. Changes # to it will not persist across an instance reboot. To disable cloud-init's # network configuration capabilities, write a file # /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg with the following: # network: {config: disabled} network: ethernets: ibmvetha: addresses: - 10.245.71.133/21 gateway4: 10.245.64.1 match: macaddress: fa:39:12:da:21:0a mtu: 1500 nameservers: addresses: - 10.245.71.3 - 10.245.64.1 search: - maas set-name: eth0 version: 2 ubuntu@p9g-lpar07:~$ sudo netplan apply ** (generate:23340): WARNING **: 14:01:15.405: `gateway4` has been deprecated, use default routes instead. See the 'Default routes' section of the documentation for more details. ** (process:23338): WARNING **: 14:01:15.840: `gateway4` has been deprecated, use default routes instead. See the 'Default routes' section of the documentation for more details. ubuntu@p9g-lpar07:~$ ip addr 1: lo: