Configure Static IP on ArconQ VM Network Interface
It is crucial to ensure your ArconQ VM network interface has assigned a static IP address. Kubernetes API Server is exposed on the IP configured during cluster bootstrap (which is performed by ArconQ Installed). Hence, if the IP address changes later, your Kubernetes API Server may not start, effectively leaving you without administrative access to your cluster.
At this point you have two options:
- Configure static IP for ArconQ VM in your DHCP server
- Configure static IP on your ArconQ VM network interface
Configure DHCP Server
ArconQ VM utilizes DHCP client, so if a DHCP server is available in your network, the IP address will be obtained automatically. However, it is crucial to reserve an IP address for the ArconQ VM network interface in DHCP server configuration, so the ArconQ VM gets always assigned with the same IP address.
If you do not have access to DHCP server, you can assign a static IP to your ArconQ VM network interface. It is important that you select IP address outside the address range utilized by DHCP to avoid IP address conflicts in your network.
Configure ArconQ VM Network Interface
All listed commands should be executed as root user.
This configuration should not be performed while being connected to the machine over SSH. Changing network interface configuration may disconnect you from the machine!
In order to configure network interface first you need to find the interface name. Execute following command:
ip link show
You should see similar output:
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT group default qlen 1000
link/ether 00:15:5d:03:27:08 brd ff:ff:ff:ff:ff:ff
The lo interface is a loopback interface. In this case the interface that we want to configure is eth0. Copy the MAC address of eth0 interface (in this case it's 00:15:5d:03:27:08 in the second line of eth0 section).
In your case the interface may be named differently. Depending on the virtualization system (Hyper-V, VirtualBox), it can be named for example eth0, enp0s3, wlan0 (wireless LAN). If you have more than one network interface enabled in your virtual machine, there will be more than one network device on the list, for example eth0, eth1 and so on.
In this example it is assumed your network interface is named eth0. If it isn't a case for you, adjust all occurrences of eth0 accordingly.
Now, you need to create network device configuration file. Open it in text editor using following command:
nano /etc/network/interfaces.d/eth0
Copy following configuration, and paste it to the open text (you can use Ctrl+Shift+V). Then adjust address, gateway, netmask and optionally dns-servernames fields to IP addresses of your choice.
auto eth0
iface eth0 inet static
address 192.168.1.100
gateway 192.168.1.1
netmask 255.255.255.0
dns-nameservers 8.8.8.8 8.8.4.4
Save the file with Ctrl+O and exit the editor with Ctrl+X.
Now, release the current DHCP leases and stop DHCP client:
dhclient -r && systemctl disable dhcpcd
To apply your network configuration, restart networking service:
systemctl restart networking.service
At the end verify if a desired IP address has been assigned to the network interface:
ip addr show eth0
Your eth0 interface should be now assigned with your IP address.