中文 English

Installing a Minimal k8s Environment with Minikube

Published: 2024-04-30
k8s Proxmox VE PVE

Deploying Minikube on Proxmox VE (a Debian-based virtualization environment) requires consideration of Proxmox’s characteristics, as it is essentially a virtual machine and container management platform. You will need to create a virtual machine (VM) on Proxmox VE and then install Minikube within that VM. Below are the detailed steps:

Step 1: Create and Configure the Virtual Machine

  1. Log in to the Proxmox VE management interface:

    • Typically accessed via a web browser at https://<Proxmox_IP>:8006.
  2. Create a new virtual machine:

    • Click the “Create VM” button in Proxmox.
    • Name the VM, select “Linux” as the installation type, and determine the version based on the Linux distribution you intend to install (Ubuntu or Debian is recommended).
  3. Configure hardware:

    • CPU: Allocate at least 2 cores.
    • Memory: Allocate at least 2GB of RAM.
    • Disk: At least 20GB of storage space.
    • Network: Ensure the VM can access the internet.
  4. Install the operating system:

    • Mount the ISO file and perform the OS installation via Proxmox’s console.
    • Set the necessary user and network configurations during the installation process.

Step 2: Install and Configure Minikube

  1. Connect to the virtual machine:

    • Use SSH or connect through Proxmox’s console to access the newly created VM.
  2. Install kubectl:

    • Install kubectl on the VM. For Ubuntu/Debian systems, you can use the following command:
      curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
      chmod +x ./kubectl
      sudo mv ./kubectl /usr/local/bin/kubectl
      kubectl version --client
      
  3. Install Minikube:

    • Download and install Minikube. For Linux systems, you can use the following command:
      curl -Lo minikube https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64
      chmod +x minikube
      sudo install minikube /usr/local/bin/
      
  4. Start Minikube:

    • Since running inside a VM, it is recommended to use Docker as the driver. First ensure Docker is installed, then start Minikube:
      minikube start --driver=docker
      
    • This step will automatically pull the necessary Minikube Docker images and start the Kubernetes cluster.
  5. Verify the installation:

    • Run kubectl get nodes to check the cluster status; it should show the minikube node in the READY state.

Step 3: Configure and Use the Kubernetes Cluster

By following the steps above, you can successfully deploy and run a Minikube Kubernetes cluster on Proxmox VE, providing a relatively isolated and resource-controlled environment for development and testing purposes.