Welcome to the Linux Foundation Forum!

Setting up on MAC M1 using VMFusion virtual machine Ubuntu 24.04LTS

I'm just getting started for the course. I've only used Minikube before (have docker installed on mac) so this is my first time setting all of this up. I have quite a few questions and feel like I'm going in circles making things way harder than they are.

I have: Mac M1, VMFusion (set up control plane node according to lab 2.1 instructions), Ubuntu 24.04 LTS, swap disabled, apparmor disabled. All kubernetes (kubeadm, kubectl, kubelet, etc) are installed on mac, but not VM yet.

  1. Course says using a private network is best for troubleshooting and not to use ip 192. When I do private network in fusion, it goes to 192. I have no idea how to change this and am running into deadends when trying to find resources.
  2. Do I need to install containerd in my VM? or do I need to install Docker in my VM? Both? My understanding is docker already uses containerd via cri-shim, but I'm wondering if that was just when using minikube.
  3. Do I need to back up and install the scripts in lab 2.1 first before trying to do all of this? Do those scripts already install containerd, kubeadm, kubectl etc for me?
  4. When I try to ssh into my vm from iterm, it says theres no internet. Is this due to the private network, if so, how do I use iterm to access my vm and have internet while doing private network?

Essentially, where am I messing up and what do I need to do.

Answers

  • chrispokorni
    chrispokorni Posts: 2,577

    Hi @kallen17,

    The LFD259 course comes with specific installation instructions, provided to you in the lab guide. Start with the Overview and Preliminaries exercise that details the virtual environment requirements. Provision two Virtual Machines of the size and guest OS specified. Ensure you follow the networking instructions as they are presented in the lab guide.

    1. What do you mean by:

    Course says using a private network is best for troubleshooting and not to use ip 192

    I cannot seem to find this information in the lab guide. Are you following the latest release?

    1. The installation should be done on the VMs respectively, not your workstation.

    All kubernetes (kubeadm, kubectl, kubelet, etc) are installed on mac, but not VM yet.

    1. Run the installation scripts as you are instructed by the lab guide. Feel free to inspect those scripts prior to running them, to discover the packages, tools, and configuration options that go into setting up each of the two Kubernetes nodes. The course is not relying on the Minikube environment, therefore the tool and its dependencies are not required to be installed. If they are already found on your host system, they should not interfere with the intended setup.

    2. Networking issues:

    When I try to ssh into my vm from iterm, it says theres no internet ...

    For any networking related issues between your host workstation and the guest VMs, inspect the official documentation of your hypervisor. Keep in mind that the VMs should be accessible from the host system, should be able to communicate with each other, and both should have access to the internet - networking aspects managed through the hypervisor.

    It is best to start with new VMs provisioned to the specs provided in the lab guide, after the hypervisor has been configured with the necessary networking settings. Then run the installation and configuration scripts as instructed by the lab guide to build the cluster necessary for the course. Since your host is powered by M1 processor, the ARM architecture may introduce some challenges at times, but not prevent you from completing the course lab work on your host. However, if your hypervisor supports AMD64 guest OS installations, I would recommend trying that instead.

    Regards,
    -Chris

  • kallen17
    kallen17 Posts: 2
    edited January 20

    Hi Chris, thank you so much for getting back to me.

    First and foremost, you mentioned specific installation instructions in a lab guide. I assume you're referring to networking instructions? There are videos within the course for setting up the lab environment if you are using AWS or GCE (costs extra), but I haven't found anything for host hypervisors. Can you point me to this lab guide? Are you referring to the resource files?

    I have provisioned the machines, but am unable to download the scripts whether I ssh into my VM from iterm or within the fusion terminal itself (this is the same for if I do private networking, or use 'share with mac'.) I do not know what is causing the DNS/networking issue and feel quite lost. I can absolutely spend more time looking in Fusion docs if that is what you recommend. To follow-up on your questions:

    I cannot seem to find this information in the lab guide. Are you following the latest release?

    Under "Course Details & System Requirements", then "Lab Environment", the first bullet point says not to use 192 network for nodes. The 3rd paragraph following that says "Virtual machines such as KVM, VirtualBox, or VMWare can also be used for the lab systems. Putting the VMs on a private network can make troubleshooting easier." I interpreted this to mean I should be putting my VMs on a private network.

    The installation should be done on the VMs respectively, not your workstation.Run the installation scripts as you are instructed by the lab guide. Feel free to inspect those scripts prior to running them, to discover the packages, tools, and configuration options that go into setting up each of the two Kubernetes nodes. The course is not relying on the Minikube environment, therefore the tool and its dependencies are not required to be installed. If they are already found on your host system, they should not interfere with the intended setup.

    Yes, this is what I am attempting to do. The scripts/yaml files do not seem to contain the kubernetes components, so I was unaware if I needed to install containerd and those components prior to executing the scripts, or if it mattered. Either way, I haven't been able to successfully execute the scripts or get containerd installed on my VMs.

    This is the order in which I've done things:

    • Downloaded Fusion and Ubuntu iso image for AMD64
    • Provisioned VMs according to the 'lab environment' tab within the Course Details & System Requirements (cp and worker nodes). This was successful.
    • Lab 2.1 which reiterates above info and asks you to download scripts/yaml files. I was not able to execute the scripts. Output was: wget: unable to resolve host address. I was unsuccessful in troubleshooting the network issue.
    • I attempted to download containerd, but ran into issues there as well.

    I apologize for the verbose response but hopefully this is more articulate than my original post. Thank you again for your help.

  • chrispokorni
    chrispokorni Posts: 2,577

    Hi @kallen17,

    By the lab guide I am strictly meaning the lab instructions that appear as embedded PDF pages in the lab exercise section.

    The demo video instructions are helpful to provision and configure cloud VMs (AWS EC2 instances and Google Cloud GCE instances). In the case of a local hypervisor, aside from the guest OS Ubuntu 24.04 LTS, the virtual-hardware requirements per VM (2 vCPU, 8 GB RAM, 20+ GB vdisk, 1 bridged network interface), it is important to configure in the hypervisor the virtual network interface of each VM to accept all inbound traffic - that is all protocols, from all sources, to all port destinations. A single bridged interface per VM should satisfy the node-node, node-host, and node-internet communication. More advanced networking settings are also possible with multiple network interfaces per VM, but they require additional configuration when bootstrapping the Kubernetes cluster. Also, the 192.168.xx.zz IP addresses should be acceptable for the VMs because the current CNI network plugin - Cilium, is setting up the application pod network on the 10.0.0.0/8 default range.

    Once you manage to download and extract the SOLUTIONS tarball (with wget and tar), the k8scp.sh (for cp) and k8sWorker.sh (for worker) scripts are to be executed on their respective VMs, to install all necessary components and perform minimal configuration. You are not required to manually install the container runtime, nor the container orchestrator components.

    Regards,
    -Chris

Categories

Upcoming Training