As far as csi-Unity is concerned -Unity does not support configuration to choose specifically First of Second Network Interface.
It is the underlying operating system that decides on which interface to route the traffic. Kindly check Network addresses under the host object on Unity array if both NIC are added by the driver.
I'd like to share the workaround that I know. Unity CSI Driver creates hosts in Unity based on the hostname of the OS and node's name of K8S. So you can use IPs of other network interfaces, not first interface.
1. You have to add the domain name of the network you want to allow access to /etc/hosts of the OS(Worker Nodes). 2. And then you have to delete pods of unity node plugin. (Before deleting the pods, You must delete the host information that was previously generated by Unity CSI in Unity Unisphere.)
Here's an example for your reference.
- Worker Node Name : k8s-worker01.yourdomain.com - First network interface's IP : 192.168.0.100 - Second network interface's IP : 172.31.0.100
*** You have to add the hostname including the hostname of worker node. ***
Thanks to both of you for the comments.Both were very useful.
The solution that helped in our case was to add the ip address of the second network interface in Unity Web Interface -> Hosts -> edit host -> Network adresses and then with "+" we added the desired IP address.
Thar_J
42 Posts
0
August 5th, 2021 03:00
Hi @emladenov
As far as csi-Unity is concerned -Unity does not support configuration to choose specifically First of Second Network Interface.
It is the underlying operating system that decides on which interface to route the traffic. Kindly check Network addresses under the host object on Unity array if both NIC are added by the driver.
Regards
Thar_J
chesed82
10 Posts
0
August 5th, 2021 08:00
Hello,
I'd like to share the workaround that I know.
Unity CSI Driver creates hosts in Unity based on the hostname of the OS and node's name of K8S.
So you can use IPs of other network interfaces, not first interface.
1. You have to add the domain name of the network you want to allow access to /etc/hosts of the OS(Worker Nodes).
2. And then you have to delete pods of unity node plugin. (Before deleting the pods, You must delete the host information that was previously generated by Unity CSI in Unity Unisphere.)
Here's an example for your reference.
- Worker Node Name : k8s-worker01.yourdomain.com
- First network interface's IP : 192.168.0.100
- Second network interface's IP : 172.31.0.100
*** You have to add the hostname including the hostname of worker node. ***
/etc/hosts
192.168.0.100 k8s-worker01.yourdomain.com
172.31.0.100 k8s-worker01-storage.yourdomain.com
I hope that this is helpful for you.
But note that this is not a official solution.
emladenov
4 Posts
0
August 10th, 2021 22:00
Hello chesed82, Thar_J
Thanks to both of you for the comments.Both were very useful.
The solution that helped in our case was to add the ip address of the second network interface in Unity Web Interface -> Hosts -> edit host -> Network adresses and then with "+" we added the desired IP address.
Best regards,
Emiliyan Mladenov