Flannel yaml file customization --iface for vagrant Linux cluster



Kubadm to install and configure kuberetes cluster using vagrant Linux Virtual Box:

I have configured Linux nodes with static ip using vagrant.
I noticed that there is known issue with vagrant having default Ethernet pointing to and flannel maps network with this, and in order to change the default network mapping in flannel, we need to pass arguments --iface=–eth1.
I could not make it work with changing yaml as it is giving error. Did any one got it work ?
can you paste the snippet of yaml file with write arguments ?
I tried both the following ways…
Version:1.0 StartHTML:000000272 EndHTML:000007991 StartFragment:000007688 EndFragment:000007893 StartSelection:000007688 EndSelection:000007886 SourceURL:https://stackoverflow.com/questions/47845739/configuring-flannel-to-use-a-non-default-interface-in-kubernetes


Version:1.0 StartHTML:000000235 EndHTML:000004518 StartFragment:000003452 EndFragment:000004428 StartSelection:000003525 EndSelection:000004418 SourceURL:https://github.com/samarjit/vagrant-kubeadm/blob/master/kube-flannel.yml

- name: kube-flannel
image: quay.io/coreos/flannel:v0.9.0-amd64
command: [ “/opt/bin/flanneld”, “–ip-masq”, “–kube-subnet-mgr” , “–iface=enp0s8” ]
  - name: kube-flannel
    image: quay.io/coreos/flannel:v0.10.0-amd64
    - /opt/bin/flanneld
    - --ip-masq
    - --kube-subnet-mgr
    - --iface=enp0s8