To set a static IP on your Ubuntu VM for Kubernetes installation, first identify your network interface using ip a. Then, edit the Netplan config file (e.g., /etc/netplan/01-netcfg.yaml) and set dhcp4: no, specifying your static IP, gateway, and DNS. For example, assign 192.168.1.100/24 as the IP, 192.168.1.1 as the gateway, and use 8.8.8.8 as DNS. Save the file and apply changes using sudo netplan apply. Make sure the YAML is properly indented and your VM network adapter is set to “Bridged” mode if needed.