Skip to content

failed (add): failed to create macvlan: cannot assign requested address #1378

Closed
@dmfrey

Description

@dmfrey

I'm not able to assign addresses to my pod.

Multus is deployed with FluxCD, here is the HelmRelease:
https://github.com/dmfrey/home-gitops/blob/main/kubernetes/homelab-k8s-001/apps/network/multus/app/helmrelease.yaml

And my networks are configured with the following NetworkAttachmentDefinition:
https://github.com/dmfrey/home-gitops/blob/main/kubernetes/homelab-k8s-001/apps/network/multus/config/networkattachment-iot.yaml

My Talos cluster exposes the eth0.50 vlan

92.168.30.31   network     LinkStatus   eth0              13        ether               38:f7:cd:c6:11:4a                                 up           true
192.168.30.31   network     LinkStatus   eth0.30           12        ether      vlan     38:f7:cd:c6:11:4a                                 up           true
192.168.30.31   network     LinkStatus   eth0.50           11        ether      vlan     38:f7:cd:c6:11:4a                                 up           true

I'm applying a pod annotation to the pod in the HelmRelease:

pod:
  annotations:
     k8s.v1.cni.cncf.io/networks: |
      [{
        "name": "iot-vlan",
        "namespace": "network",
        "ips": ["192.168.50.8/24"],
        "mac": "f1:fd:59:0b:bd:2b"
      }]

When the pod starts its fire the following events.

Events:                                                                                                                                                                                                                                                                                            
  Type     Reason                  Age   From               Message                                                                                                                                                                                                                                
  ----     ------                  ----  ----               -------                                                                                                                                                                                                                                
  Normal   Scheduled               5s    default-scheduler  Successfully assigned download/admin-c5999f66d-djg6t to dmf-amd-003                                                                                                                                                                    
  Normal   AddedInterface          5s    multus             Add eth0 [172.22.0.238/32] from cilium                                                                                                                                                                                                 
  Warning  FailedCreatePodSandBox  4s    kubelet            Failed to create pod sandbox: rpc error: code = Unknown desc = failed to setup network for sandbox "a56b77988d8ac693fdbaad50a8b0d03e237a689d6df2b59678e00b713d207da4": plugin type="multus" name="multus-cni-network" failed (add): [do
wnload/admin-c5999f66d-djg6t/2ff097cc-9ee0-48b3-a0b2-4d60efb80ab4:iot-vlan]: error adding container to network "iot-vlan": plugin type="macvlan" failed (add): failed to create macvlan: cannot assign requested address                                                                           

Is there some way to get around this issue?

Environment:

  • 5 Talos Linux kubernetes nodes
  • 3 control plane nodes
  • 2 worker nodes
  • Ubiquiti UDM Special Edition
  • .30 vlan homelab (where the nodes live)
  • .50 vlan iot

If there is anything else I can provide, please let me know. Thanks for any assistance.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions