root@k8s-master-u2404-4-20-102:~# hostnamectl set-hostname k8s-master-u2404-4-20-102
root@k8s-master-u2404-4-20-102:~# cat /etc/netplan/50-cloud-init.yaml
# This file is generated from information provided by the datasource. Changes
# to it will not persist across an instance reboot. To disable cloud-init's
# network configuration capabilities, write a file
# /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg with the following:
# network: {config: disabled}
network:
ethernets:
eth0:
dhcp4: false
dhcp6: false
addresses: [172.16.101.102/24]
gateway4: 172.16.101.2
nameservers:
addresses: [114.114.114.114, 8.8.8.8]
version: 2
root@k8s-master-u2404-4-20-102:~# netplan apply
** (generate:1718): WARNING **: 00:15:59.532: `gateway4` has been deprecated, use default routes instead.
See the 'Default routes' section of the documentation for more details.
** (process:1717): WARNING **: 00:15:59.850: `gateway4` has been deprecated, use default routes instead.
See the 'Default routes' section of the documentation for more details.
** (process:1717): WARNING **: 00:15:59.947: `gateway4` has been deprecated, use default routes instead.
See the 'Default routes' section of the documentation for more details.