<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: ImmTB</title>
    <description>The latest articles on DEV Community by ImmTB (@immtb).</description>
    <link>https://dev.to/immtb</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F965141%2Ffbef7599-db89-4b42-b09c-44fc6b2b494e.png</url>
      <title>DEV Community: ImmTB</title>
      <link>https://dev.to/immtb</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/immtb"/>
    <language>en</language>
    <item>
      <title>How I deployed portainer.io in Kubernetes Using an Ubuntu Server in an ESXi Hypervisor</title>
      <dc:creator>ImmTB</dc:creator>
      <pubDate>Thu, 14 Dec 2023 17:11:12 +0000</pubDate>
      <link>https://dev.to/immtb/how-i-deployed-portainerio-in-kubernetes-using-an-ubuntu-server-in-an-esxi-hypervisor-4k5f</link>
      <guid>https://dev.to/immtb/how-i-deployed-portainerio-in-kubernetes-using-an-ubuntu-server-in-an-esxi-hypervisor-4k5f</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;This is a post listing the details of how I deployed portainer.io in Kubernetes.&lt;/p&gt;

&lt;p&gt;
  Why &lt;a href="//portainer.io"&gt;portainer.io&lt;/a&gt;?
  &lt;br&gt;
Portainer.io acts as a web-based GUI for managing containers in Kubernetes. This can be more efficient for managing Kubernetes clusters with several containers.&lt;br&gt;


&lt;/p&gt;

&lt;p&gt;I'll be using VMware Workstation Pro to setup a VMware ESXi server, from which I will then spawn an Ubuntu server (version 22.04.3 LTS).&lt;br&gt;
Before continuing, please note that VMware hypervisors are not necessary for the deployment of a Kubernetes cluster. A dedicated Ubuntu server, an Ubuntu server within a Virtual Machine (whether that be a type-1 or type-2 hypervisor), or other solutions can be used to accomplish the same goal.&lt;/p&gt;
&lt;h3&gt;
  
  
  Downloading the Software and Ubuntu Disc Image
&lt;/h3&gt;

&lt;p&gt;The version of VMware Workstation Pro that I am using can be downloaded at &lt;a href="https://www.vmware.com/products/workstation-pro/workstation-pro-evaluation.html" rel="noopener noreferrer"&gt;vmware.com&lt;/a&gt;, but VMware Workstation Player could also be used to deploy the . &lt;/p&gt;

&lt;p&gt;The ESXi hypervisor that I will be using is &lt;a href="https://www.vmware.com/products/vsphere.html" rel="noopener noreferrer"&gt;vSphere 8&lt;/a&gt;. I will only be using the 60-day trial version of it, but it will be enough for my project today.&lt;/p&gt;

&lt;p&gt;
  What is a hypervisor?
  &lt;br&gt;
A hypervisor is a type of computer software or operating system that can be used to create and run virtual machines.&lt;br&gt;


&lt;/p&gt;

&lt;p&gt;I downloaded the Ubuntu server image file from &lt;a href="https://ubuntu.com/download/server" rel="noopener noreferrer"&gt;ubuntu.com&lt;/a&gt;. The most recent version of the Ubuntu server is 22.04.3 at the time of writing, and the .iso file containing the operating system is 2GB in size.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 2: Installing VMware Workstation and Creating ESXi Virtual Machine
&lt;/h3&gt;

&lt;p&gt;Setup for the hypervisors are quite simple. I ran the .exe file downloaded from VMware's website to install VMware Workstation Pro. A guided installation window appeared that walked through the options for the software installation. Next, I will be creating a new virtual machine (being the ESXi server). Upon clicking the &lt;code&gt;Create a New Virtual Machine&lt;/code&gt;, a window named &lt;code&gt;New Virtual Machine Wizard&lt;/code&gt; appeared.&lt;/p&gt;

&lt;p&gt;
  What is a virtual machine (VM)?
  &lt;br&gt;
A virtual machine is essentially a computer running inside a computer. In this case, my computer (the host, running Windows 11) will be running a computer with an ESXi hypervisor installed on it (being the guest operating system, or guest OS). Later on, that ESXi hypervisor will be the host of the Ubuntu Server VM. This is known as "nested virtualization".&lt;br&gt;


&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7mftb5406rx6u7dhkts2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7mftb5406rx6u7dhkts2.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I had been prompted to choose between a typical or custom installation method, chose &lt;code&gt;Typical (recommended)&lt;/code&gt;, and clicked &lt;code&gt;Next &amp;gt;&lt;/code&gt;.&lt;br&gt;
Next, I am asked how guest operating system should be installed. I selected &lt;code&gt;Installer disc image file (iso):&lt;/code&gt;, and clicked &lt;code&gt;Browse...&lt;/code&gt; to choose the .iso file corresponding to the vSphere hypervisor, then clicked &lt;code&gt;Next &amp;gt;&lt;/code&gt;.&lt;br&gt;
The guest operating system will be VMware ESX, so I selected the &lt;code&gt;VMware ESX&lt;/code&gt; option. In the &lt;code&gt;Version&lt;/code&gt; section, I clicked the dropdown menu and made sure that &lt;code&gt;VMware ESXi 7&lt;/code&gt; was selected, then clicked &lt;code&gt;Next &amp;gt;&lt;/code&gt;.&lt;br&gt;
I named the VM "Final ESXi", since it is something unique from other virtual machines (and is the ESXi VM being used for my final here). I preferred to save the virtual machine files to a different folder on a different drive, so I clicked &lt;code&gt;Browse...&lt;/code&gt; and selected the designated folder on the drive that I wanted to save the virtual machine files to, then clicked &lt;code&gt;Next &amp;gt;&lt;/code&gt;.&lt;br&gt;
Here, I specified the disk capacity (in GB). This is normally defined by the amount of free space you can spare for the VM and believe that you need for it, but I just kept the default option of 142 GB since it would be sufficient for this project.&lt;br&gt;
Finally, I am presented with a screen that shows what hardware will be used with the virtual machine. I increased the CPU cores from the default to 2 cores and 2 processors per core, as well as the ram to 8GB (8192MB), then clicked &lt;code&gt;Finish&lt;/code&gt;.&lt;/p&gt;
&lt;h3&gt;
  
  
  Step 3: Setting up the ESXi Hypervisor
&lt;/h3&gt;

&lt;p&gt;First, I created a virtual hard drive so that the ESXi hypervisor had somewhere to store the Ubuntu VM I was about to create. I did this by selecting the ESXi hypervisor in VMware Workstation Pro (in the left panel), then clicking &lt;code&gt;Edit virtual machine settings&lt;/code&gt;. From there, towards the bottom left of the &lt;code&gt;Virtual Machine Settings&lt;/code&gt; window, I used the &lt;code&gt;Add&lt;/code&gt; button to select &lt;code&gt;Hard Disk&lt;/code&gt; in the &lt;code&gt;Add Hardware Wizard&lt;/code&gt;. I selected &lt;code&gt;SCSI&lt;/code&gt; for my disk type, selected &lt;code&gt;Create a new virtual disk&lt;/code&gt; when asked what disk I wanted to use, and gave the virtual disk a maximum size of 50GB, made sure that the &lt;code&gt;Allocate all disk space now&lt;/code&gt; was unchecked and continued with the default option of splitting the virtual disk into multiple files. Finally, I was asked to specify the disk file, to which I accepted the default Disk file and clicked &lt;code&gt;Finish&lt;/code&gt;, then clicked &lt;code&gt;OK&lt;/code&gt; on the &lt;code&gt;Virtual Machine Settings&lt;/code&gt; window.&lt;/p&gt;

&lt;p&gt;After I completed setup of the virtual hard drive, I booted up the ESXi hypervisor with the &lt;code&gt;Power on this virtual machine&lt;/code&gt; button. The ESXi's boot process takes a while, but eventually I was greeted with a welcome screen that looks something like this:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5i428kofb35m1izfmwmy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5i428kofb35m1izfmwmy.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I pressed &lt;code&gt;Enter&lt;/code&gt;, &lt;code&gt;F11&lt;/code&gt; to accept the terms of use, and was prompted to select a disk to install the ESXi hypervisor to. I chose the one with 142GB of capacity and pressed &lt;code&gt;Enter&lt;/code&gt;. If I wanted to use the other drive, I could have used the arrow keys (up and down) to select it.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fl8mxl2qvlyr1upsjt09f.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fl8mxl2qvlyr1upsjt09f.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I selected &lt;code&gt;US Default&lt;/code&gt; as my keyboard layout, then press &lt;code&gt;Enter&lt;/code&gt; to continue.&lt;br&gt;
Here, I was asked for a password. My password consists of at least one symbol, capital letter, a number, and is at least 10 characters in length. After typing my password (as well as typing it in the &lt;code&gt;confirm password&lt;/code&gt; text area), I pressed &lt;code&gt;Enter&lt;/code&gt; to continue.&lt;br&gt;
I was asked to confirm the install, as the screen warns that the disk will be partitioned. I pressed &lt;code&gt;F11&lt;/code&gt; to install. The installation was then in progress, and took less than a minute to complete.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fghk0tt0mxym9q6nb65rg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fghk0tt0mxym9q6nb65rg.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Finally, the installation had completed and the screen told me to remove the installation media before rebooting. To do this, I escaped the mouse and keyboard control from the ESXi hypervisor by pressing &lt;code&gt;Ctrl + Alt&lt;/code&gt; at the same time. Then, I right-clicked the name of the ESXi hypervisor in the left panel of VMware Workstation Pro, hovered over &lt;code&gt;Removable Devices&lt;/code&gt;, hovered over &lt;code&gt;CD/DVD (IDE)&lt;/code&gt;, and clicked &lt;code&gt;Disconnect&lt;/code&gt;. Returning to the ESXi hypervisor (by clicking on the area where the &lt;code&gt;Installation Complete&lt;/code&gt; window still was), I pressed &lt;code&gt;Enter&lt;/code&gt;, rebooting the ESXi hypervisor.&lt;/p&gt;

&lt;p&gt;After only about 20 seconds, I am booted into the ESXi hypervisor, and can see in the yellow half of the screen the IP that I should go to in my browser in order to manage it.&lt;br&gt;
Upon entering the IP address in my browser's search bar, I am shown an alert that states that the website I am going to does not have a valid SSL certificate, and is therefore insecure. Clicking &lt;code&gt;Advanced&lt;/code&gt;, I am able to bypass the security warning and access the ESXi login page. Please note that not all browsers have the same warning when accessing pages without SSL certificates, so you may need to search how to get past the SSL warning page on your specific browser, or with your specific antivirus software while accessing an ESXi hypervisor's web console.&lt;br&gt;
On the login page, I am prompted for a username and password, as seen in the screenshot below:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Feajktb79mql7uf4526jn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Feajktb79mql7uf4526jn.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;By default, the username is &lt;code&gt;root&lt;/code&gt; and the password is whatever was previously defined in the setup of the ESXi hypervisor.&lt;br&gt;
Finally I am in the ESXi web console, and can see data such as CPU/RAM utilization, system information, hardware, etc.&lt;/p&gt;
&lt;h3&gt;
  
  
  Step 4: Creating the Ubuntu Server Virtual Machine
&lt;/h3&gt;

&lt;p&gt;To create the Ubuntu Server Virtual Machine, I will first need to get the Ubuntu Server .iso file into the ESXi's storage. Navigating to the storage tab in the left panel, I am shown the &lt;code&gt;Datastores&lt;/code&gt; tab by default.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmbdes6kajl9bpntzgqco.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmbdes6kajl9bpntzgqco.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Here, I click &lt;code&gt;New datastore&lt;/code&gt;. This opens a menu to set up the new datastore.&lt;/p&gt;

&lt;p&gt;
  What is a datastore?
  &lt;br&gt;
The datastore acts as a storage device for the Virtual Machine and its associated files.&lt;br&gt;


&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdbdms07qhf57scrfkgss.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdbdms07qhf57scrfkgss.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For step one, I choose &lt;code&gt;Create new VMFS datastore&lt;/code&gt; as my datastore creation type. For step two, I choose the 50GB drive that had been previously set up on the ESXi VM. I'll be naming the device "UbuntuServerISO" for simplicity.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhrs1ick47gyjmq09z1sw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhrs1ick47gyjmq09z1sw.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;On the third step, I select the default partitioning options and clicked &lt;code&gt;NEXT&lt;/code&gt;. Step 4 is just an overview of the configuration of the datastore, so I clicked &lt;code&gt;FINISH&lt;/code&gt;, clicking &lt;code&gt;YES&lt;/code&gt; on the warning that stated that the virtual disk that was about to hold the datastore was about to be erased. Since it was empty (inside a VM), this was fine and the datastore was successfully created!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F76hxgj202jecpn71zo58.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F76hxgj202jecpn71zo58.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To upload the Ubuntu Server .iso file, I click the &lt;code&gt;Datastore browser&lt;/code&gt; button to show the datastore browser window, then I click &lt;code&gt;UbuntuServerISO&lt;/code&gt; to make sure that the datastore that I am about to upload to is the correct one. I click &lt;code&gt;Upload&lt;/code&gt; in the top right of that window, which opens file explorer, from which I can select the .iso file I previously downloaded.&lt;br&gt;
The .iso file took about 3 minutes, and is now visible in the &lt;code&gt;Datastore browser&lt;/code&gt; under the &lt;code&gt;UbuntuServerISO&lt;/code&gt; tab.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhkn5w6lv42h2gcklp8gk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhkn5w6lv42h2gcklp8gk.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I can now close the &lt;code&gt;Datastore browser&lt;/code&gt; tab and click on the &lt;code&gt;Virtual Machines&lt;/code&gt; tab on the left sidebar, then click &lt;code&gt;Create / Register VM&lt;/code&gt; to create the new virtual machine.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2g2pcw90i4uryriao2fl.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2g2pcw90i4uryriao2fl.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;New virtual machine&lt;/code&gt; menu appears on the screen, asking for the creation type of the VM. I click &lt;code&gt;Create a new virtual machine&lt;/code&gt;.&lt;br&gt;
The next step asks for a name and guest operating system for the VM. For the name, I use "Ubuntu Server 22.04" as it corresponds to the guest operating system name and version number that I will be using in the VM. I leave the compatibility option set to its default, &lt;code&gt;ESXi 8.0 U2 virtual machine&lt;/code&gt;, set the &lt;code&gt;Guest OS family&lt;/code&gt; to &lt;code&gt;Linux&lt;/code&gt;, and set the &lt;code&gt;Guest OS version&lt;/code&gt; option to &lt;code&gt;Ubuntu Linux (64-bit)&lt;/code&gt;.&lt;br&gt;
Step 3 prompts me to select the storage type and datastore for the VM that I am about to create, so I choose the &lt;code&gt;UbuntuServerISO&lt;/code&gt; option from the list, since it has enough space to store the files of the VM.&lt;br&gt;
On step 4, I am shown a list of Virtual Hardware that I can configure, from RAM to network adapters, etc. I allocate 4GB of memory (RAM) to the VM, then head over to the &lt;code&gt;CD/DVD Drive 1&lt;/code&gt; category, where I select the dropdown menu to select &lt;code&gt;Datastore ISO file&lt;/code&gt;. The &lt;code&gt;Datastore browser&lt;/code&gt; menu shows on the screen and I am able to choose the .iso file corresponding to the Ubuntu Server by clicking the &lt;code&gt;UbuntuServerISO&lt;/code&gt; tab on the left panel of the menu, then clicking the .iso file in the next panel to the right of the left one.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9848mum1w9mg0jp03n9d.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9848mum1w9mg0jp03n9d.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Upon clicking &lt;code&gt;NEXT&lt;/code&gt;, I am shown all of the hardware that is going to be allocated to the VM.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fx9c735xgu9h6f0lmrya9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fx9c735xgu9h6f0lmrya9.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Finally, the Ubuntu Server VM is created! Setting it up should be a breeze, as there are only a few steps to it.&lt;/p&gt;
&lt;h3&gt;
  
  
  Step 5: Setting Up the Ubuntu Server Virtual Machine
&lt;/h3&gt;

&lt;p&gt;First thing's first, I'll need to start the VM by clicking the hyperlink to it on the &lt;code&gt;Virtual Machines&lt;/code&gt; page (or under the &lt;code&gt;Virtual Machines&lt;/code&gt; tab), then clicking the &lt;code&gt;Power on&lt;/code&gt; button towards the top of the tab.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fx2b0gg1k45365sl1u451.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fx2b0gg1k45365sl1u451.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now that it's started, I can click on the VM preview screen in the top-left of the window to view the Ubuntu Server VM. After less than 30 seconds, it finishes initializing. Now I am in the setup process of the Ubuntu Server.&lt;br&gt;
I select &lt;code&gt;English&lt;/code&gt; as my language (pressing &lt;code&gt;Enter&lt;/code&gt; to select, and using the arrow keys to navigate the UI), &lt;code&gt;Continue without updating&lt;/code&gt; when the installer update page shows (for simplicity), and select English (US) as my keyboard layout.&lt;br&gt;
I select &lt;code&gt;Ubuntu Server&lt;/code&gt; as the base for installation, keep defaults for the network connections, and since I don't have a proxy address to input, I don't configure the proxy.&lt;br&gt;
The default Ubuntu Server archive mirror will do fine for this project, so I enter done, then continue when prompted for confirmation.&lt;br&gt;
I keep the default of &lt;code&gt;Use an entire disk&lt;/code&gt; on the storage configuration page, and use the arrow keys to navigate down select &lt;code&gt;Done&lt;/code&gt;. I get a file system summary, to which I select &lt;code&gt;Done&lt;/code&gt; once more.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F01n3s9ewg5u44a0grzvk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F01n3s9ewg5u44a0grzvk.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I select continue when I get a warning for "destructive action", where it warns that the disk(s) selected in the VM will be formatted and the information will be erased. Since it is a VM, no harm will be done to the ESXi hypervisor or the host machine running VMware Workstation Pro. I select &lt;code&gt;Continue&lt;/code&gt;.&lt;br&gt;
Here, I enter the profile setup, where I will set up a user account for the VM. The information I input for this step can be found in the screenshot below (with the password censored, of course).&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2djm433ug689xs6vp7o0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2djm433ug689xs6vp7o0.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Selecting &lt;code&gt;Skip for now&lt;/code&gt; on the Ubuntu Pro page and allowing the setup for the OpenSSH server (could come in handy later on), I select &lt;code&gt;Done&lt;/code&gt; and am met with a &lt;code&gt;Featured Server Snaps&lt;/code&gt; page where I can download multiple packages alongside the installation of the Ubuntu Server. Using the arrow keys to navigate the UI, I press spacebar to select &lt;code&gt;docker&lt;/code&gt; and press &lt;code&gt;Done&lt;/code&gt;. On the next page, when the install is complete, I select &lt;code&gt;Cancel update and reboot&lt;/code&gt;. I unmount the installation media by clicking the &lt;code&gt;Actions&lt;/code&gt; button in the top-right corner of the VM tab, going to &lt;code&gt;Edit settings&lt;/code&gt;, going to the &lt;code&gt;CD/DVD Drive 1&lt;/code&gt; dropdown and de-selecting the &lt;code&gt;Connect at power on&lt;/code&gt; box. I click &lt;code&gt;SAVE&lt;/code&gt;, press &lt;code&gt;Enter&lt;/code&gt; with the VM window in focus, and the VM boots up.&lt;/p&gt;

&lt;p&gt;Now I can log in. I enter &lt;code&gt;dockerroot&lt;/code&gt; as my login username, and entered my password that had previously been created in the server setup. Just like that, I'm logged into the Ubuntu Server VM!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F42cxnsilei0g1sm6k27h.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F42cxnsilei0g1sm6k27h.png" alt="Image description"&gt;&lt;/a&gt;&lt;br&gt;
I'll quickly run &lt;code&gt;sudo apt-get update&lt;/code&gt; and &lt;code&gt;sudo apt-get upgrade&lt;/code&gt; before I shut the VM down. I click the &lt;code&gt;Actions&lt;/code&gt; button once more, hovering over &lt;code&gt;Guest OS&lt;/code&gt;, and click &lt;code&gt;Shut down&lt;/code&gt;. The VM window is still be open, so I click the &lt;code&gt;x&lt;/code&gt; in the top-right corner of the VM window to hide it.&lt;br&gt;
Now that I know the Ubuntu Server VM is in working condition, I'll take a snapshot of it.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7b5u1bssqjchdn8qxj4n.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7b5u1bssqjchdn8qxj4n.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Clicking the &lt;code&gt;Actions&lt;/code&gt; button, I hover over &lt;code&gt;Snapshots&lt;/code&gt;, click &lt;code&gt;Take snapshot&lt;/code&gt;, enter "Clean Snapshot" for the name and "Ubuntu Server with Docker installed" for the description, and click &lt;code&gt;TAKE SNAPSHOT&lt;/code&gt;. The snapshot only takes a few seconds to complete.&lt;/p&gt;

&lt;p&gt;
  What are snapshots and why should they be used?
  &lt;br&gt;
Snapshots are a way of saving the state of a virtual machine to be loaded back later when necessary.&lt;br&gt;
Snapshots can be useful in the case that there is a misconfiguration that is made in the future that stops the virtual machine from working correctly, or if the virtual machine gets a virus. In either case, snapshots can be used to roll-back a previous state of the virtual machine that is not infected/is not misconfigured in any way. Please note that this also removes all data saved on the virtual machine after the snapshot had been taken (when loaded).&lt;br&gt;


&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 6: Configuring Docker and Kubernetes
&lt;/h3&gt;

&lt;p&gt;Firstly, I am going to be running the docker image &lt;code&gt;hello-world&lt;/code&gt; to make sure that docker is working.&lt;br&gt;

  What is docker?
  &lt;br&gt;
Docker is an application that can be used to containerize applications, like Portainer. Containerization is essentially a way to isolate the application/package being run, keeping all of the application files in that same container for not only simplicity, but also security and efficiency.&lt;br&gt;
Kubernetes allows for management of containerized applications and clusters.&lt;br&gt;


&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F726h5mc6gc8s7rq2ge3z.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F726h5mc6gc8s7rq2ge3z.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It appears that the installation of docker that I am running is working correctly, so I will install Kubernetes next.&lt;br&gt;
For this next part, I'll be copy-pasting commands, so I'll want to open SSH in a terminal. I'll use PowerShell and enter the command &lt;code&gt;ssh dockerroot@IP&lt;/code&gt;, where &lt;code&gt;IP&lt;/code&gt; is the IP address of the Ubuntu Server VM. To get this information, I use the &lt;code&gt;ip a&lt;/code&gt; command and locate the &lt;code&gt;ens34&lt;/code&gt; connection, and find where it says &lt;code&gt;inet&lt;/code&gt;. Next to this, I can find the IP address of the Ubuntu Server VM.&lt;br&gt;
After running the command in PowerShell, I am able to get into the Ubuntu Server VM (after accepting the SSH fingerprint).&lt;/p&gt;

&lt;p&gt;
  What is SSH?
  &lt;br&gt;
Secure Shell (or SSH for short) allows different systems to communicate securely through a terminal/CLI. With SSH, it is possible to send commands to a remote system without having physical access to it. In the case that I am using it in right now, it isn't 100% necessary, as I could copy the commands letter-for-letter inside the Ubuntu Server VM window, but SSH makes it a lot more convenient to copy/paste commands.&lt;br&gt;


&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fucbnarwgscjgtbso5e1p.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fucbnarwgscjgtbso5e1p.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now I'm going to start installing &lt;code&gt;KUBECTL&lt;/code&gt; with the commands below. The first command will download &lt;code&gt;KUBECTL&lt;/code&gt;, the second command will make it executable, the third command with move it to /usr/local/bin/kubectl, and the last command will check the version of &lt;code&gt;KUBECTL&lt;/code&gt; to make sure it is installed.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;curl -LO "https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl"

chmod +x ./kubectl

sudo mv ./kubectl /usr/local/bin/kubectl

kubectl version --client
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Next, I'm going to install K3D, which will allow me to containerize any clusters that I create with docker. I completed the installation with the following command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;curl -s https://raw.githubusercontent.com/rancher/k3d/main/install.sh | bash
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Step 7: Running Portainer
&lt;/h3&gt;

&lt;p&gt;I'll be using this command to create the Portainer cluster:&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;&lt;code&gt;sudo k3d cluster create portainer --api-port 6443 --servers 1 --agents 1 -p "30700-30800:30700-30800@server:0"&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvxohmdat77bict711o7d.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvxohmdat77bict711o7d.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now to create the namespace for Portainer and download the .yaml config file for Portainer, I'll use the commands below:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo kubectl create namespace portainer

sudo kubectl apply -n portainer -f https://raw.githubusercontent.com/portainer/k8s/master/deploy/manifests/portainer/portainer.yaml
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now, when I go to the IP of the Ubuntu Server VM on my browser (on port 30777), I am shown the setup login page for Portainer. I'll leave &lt;code&gt;admin&lt;/code&gt; as my username, make a new password for Portainer, and click &lt;code&gt;Create user&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frzemax5eycnbesay3iw8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frzemax5eycnbesay3iw8.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now that everything's fully set up, I have access to the Portainer management page where I can do things like create new environments, add users, etc.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F590wmdhhd9ncxkk19rpo.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F590wmdhhd9ncxkk19rpo.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Wrap-up
&lt;/h2&gt;

&lt;p&gt;If you've made it this far, congratulations! I hope this helped you learn at least a bit about containers, virtual machines, or how Ubuntu servers can be utilized for services like Docker/Kubernetes. Thanks for reading, and have a great day!&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
