mirror of
https://github.com/kubesphere/kubekey.git
synced 2025-12-26 01:22:51 +00:00
Merge pull request #2041 from qyz87/qyz87-addnodes-kubevip
fix: redundant interface for kubevip when add k8s nodes
This commit is contained in:
commit
a9df358ade
|
|
@ -165,6 +165,7 @@ func (g *GetInterfaceName) Execute(runtime connector.Runtime) error {
|
|||
}
|
||||
cmd := fmt.Sprintf("ip route "+
|
||||
"| grep ' %s ' "+
|
||||
"| grep 'proto kernel scope link src'"+
|
||||
"| sed -e \"s/^.*dev.//\" -e \"s/.proto.*//\""+
|
||||
"| uniq ", host.GetAddress())
|
||||
interfaceName, err := runtime.GetRunner().SudoCmd(cmd, false)
|
||||
|
|
|
|||
Loading…
Reference in New Issue