Describe the bug
A machine pool node could have multiple valid addresses that can be used when creating a connection for running exec. However, if the first address matching with one of the preferred address types is not valid or leading to a connection error, the rest valid addresses are not considered anymore. It could leads to the permanent exec client error. The relevant code snippts can be found at 1, 2.
For example, if one of machinepool node has the following addresses:
[{"address":"2a10:abcd:e018:1234::3","type":"InternalIP"},{"address":"libvirt-provider-controller-manager-d9mst","type":"InternalDNS"}]
and preferredAddressTypes has the following values as per default:
MachinePoolHostName, MachinePoolInternalDNS, MachinePoolExternalDNS, MachinePoolExternalDNS, MachinePoolExternalIP
then, only the address for the internal dns will be considered as the connection address even when this one leads to connection error.
To Reproduce
kubectl-ironcore exec shoot--first--test1-worker-a-z1-58fb6-d4l52 -n ora-dev
If you don't see a command prompt, try pressing enter.
Error: error dialing backend: dial tcp: lookup libvirt-provider-controller-manager-d9mst on 100.104.0.10:53: no such host
2026-08-17T10:54:20.673+0200 ERROR kubectl-ironcore/main.go:29 Error running command {"error": "error dialing backend: dial tcp: lookup libvirt-provider-controller-manager-d9mst on 100.104.0.10:53: no such host"}
main.main
/Users/xyz/git/kubectl-ironcore/main.go:29
runtime.main
/opt/homebrew/Cellar/go/1.26.1/libexec/src/runtime/proc.go:290
Expected behavior
It also tries connection with InternalIP.
Describe the bug
A machine pool node could have multiple valid addresses that can be used when creating a connection for running exec. However, if the first address matching with one of the preferred address types is not valid or leading to a connection error, the rest valid addresses are not considered anymore. It could leads to the permanent exec client error. The relevant code snippts can be found at 1, 2.
For example, if one of machinepool node has the following addresses:
and
preferredAddressTypeshas the following values as per default:then, only the address for the internal dns will be considered as the connection address even when this one leads to connection error.
To Reproduce
Expected behavior
It also tries connection with InternalIP.