Close Menu
    DevStackTipsDevStackTips
    • Home
    • News & Updates
      1. Tech & Work
      2. View All

      Sunshine And March Vibes (2025 Wallpapers Edition)

      May 9, 2025

      The Case For Minimal WordPress Setups: A Contrarian View On Theme Frameworks

      May 9, 2025

      How To Fix Largest Contentful Paint Issues With Subpart Analysis

      May 9, 2025

      How To Prevent WordPress SQL Injection Attacks

      May 9, 2025

      Your password manager is under attack, and this new threat makes it worse: How to defend yourself

      May 9, 2025

      EcoFlow’s new backyard solar energy system starts at $599 – no installation crews or permits needed

      May 9, 2025

      Why Sonos’ cheapest smart speaker is one of my favorites – even a year after its release

      May 9, 2025

      7 productivity gadgets I can’t live without (and why they make such a big difference)

      May 9, 2025
    • Development
      1. Algorithms & Data Structures
      2. Artificial Intelligence
      3. Back-End Development
      4. Databases
      5. Front-End Development
      6. Libraries & Frameworks
      7. Machine Learning
      8. Security
      9. Software Engineering
      10. Tools & IDEs
      11. Web Design
      12. Web Development
      13. Web Security
      14. Programming Languages
        • PHP
        • JavaScript
      Featured

      Tap into Your PHP Potential with Free Projects at PHPGurukul

      May 9, 2025
      Recent

      Tap into Your PHP Potential with Free Projects at PHPGurukul

      May 9, 2025

      Preparing for AI? Here’s How PIM Gets Your Data in Shape

      May 9, 2025

      A Closer Look at the AI Assistant of Oracle Analytics

      May 9, 2025
    • Operating Systems
      1. Windows
      2. Linux
      3. macOS
      Featured

      kew v3.2.0 improves internet radio support and more

      May 9, 2025
      Recent

      kew v3.2.0 improves internet radio support and more

      May 9, 2025

      GNOME Replace Totem Video Player with Showtime

      May 9, 2025

      Placemark is a web-based tool for geospatial data

      May 9, 2025
    • Learning Resources
      • Books
      • Cheatsheets
      • Tutorials & Guides
    Home»Operating Systems»Linux»How to Setup Kubernetes Cluster with Minikube on Ubuntu

    How to Setup Kubernetes Cluster with Minikube on Ubuntu

    March 22, 2025

    Hey everyone! Today, I’m going to show you how to set up a Kubernetes cluster using Minikube on your Ubuntu system with Docker or VirtualBox as the driver. No worries if you’re new – I’ll keep it simple, like explaining it over a cup of tea! Kubernetes is great for managing containerized apps, and Minikube lets us run it locally.

    I’m testing this on an Ubuntu virtual machine that uses Docker. You can use the VirtualBox driver instead of Docker if you prefer. Let’s get started!

    What You’ll Need Before Starting

    Before we begin, let’s gather our tools – like prepping ingredients for dosa!

    • Ubuntu System – I’m assuming Ubuntu 24.04 or 22.04 (most versions should work).
    • Docker – We’ll use this instead of VirtualBox to run Minikube.
    • Minikube – This runs our Kubernetes cluster locally.
    • kubectl – A command-line tool to manage your Kubernetes cluster.
    • Internet Connection – For downloading stuff.

    Step 1: Update Your System

    First, let’s update Ubuntu to make sure everything’s fresh:

    sudo apt update && sudo apt upgrade -y
    

    This grabs the latest package info and updates your system. The -y says “yes” to everything automatically.

    Step 2: Install Docker (or VirtualBox)

    If you want to use VirtualBox as the driver, install it on your Ubuntu system by following this link: https://tecadmin.net/install-oracle-virtualbox-on-ubuntu/

    Since we’re using Docker as the driver, let’s install it:

    Add Docker’s official repository:

    sudo apt install -y curl
    curl -fsSL https://get.docker.com -o get-docker.sh
    sudo sh get-docker.sh
    

    Add your user to the Docker group so you don’t need sudo every time:

    sudo usermod -aG docker $USER
    

    Log out and back in (or reboot) for this to take effect. Then verify Docker:

    docker --version
    

    If you see a version number, Docker is ready!

    Step 3: Install Minikube

    Now, let’s install Minikube – the star of our setup!

    Download the latest Minikube:

    curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64
    

    Move it to a system path and make it executable:

    sudo install minikube-linux-amd64 /usr/local/bin/minikube
    

    Check if it’s installed:

    minikube version
    

    If you see a version, Minikube is good to go!

    Step 4: Install kubectl

    kubectl is our Kubernetes remote control. Let’s set it up:

    Download the latest version:

    curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
    

    Make it executable and move it:

    chmod +x kubectl
    sudo mv kubectl /usr/local/bin/
    

    Verify it:

    kubectl version --client
    

    If you see version info, it’s working!

    Step 5: Start Minikube Cluster with Docker

    Time to fire up the cluster! Since we’re using Docker, we’ll tweak a system setting first to avoid permission issues:

    sudo sysctl fs.protected_regular=0
    

    This command fixes a potential issue where Minikube can’t access certain files due to Ubuntu’s security settings. Now, start Minikube:

    minikube start --driver=docker
    

    This uses Docker as the driver. It’ll take a minute to download images and set up the cluster. Once done, you’ll see a success message.

    Step 6: Check Your Cluster

    Let’s confirm everything’s running smoothly:

    kubectl cluster-info
    

    You’ll see details like the master and KubeDNS addresses. Also, check the nodes:

    kubectl get nodes
    

    If you see minikube with a Ready status, your cluster is up!

    Step 7: Play Around (Optional)

    Let’s deploy a quick app to test it:

    kubectl create deployment hello-minikube --image=k8s.gcr.io/echoserver:1.4
    kubectl expose deployment hello-minikube --type=NodePort --port=8080
    

    Get the URL to see it in action:

    minikube service hello-minikube --url
    

    Copy the URL (like http://192.168.49.x:xxxxx), paste it in your browser, and you’ll see a simple page!

    Stopping Minikube

    When you’re done, stop the cluster to free up resources:

    minikube stop
    

    To remove it completely:

    minikube delete
    

    Wrapping Up

    That’s it, folks! You’ve set up a Kubernetes cluster on Ubuntu using Minikube with Docker. It’s like having a mini cloud on your machine – pretty neat, huh? Now you can play with Kubernetes, deploy apps, and learn more. If you hit any bumps, just search online or ask around – the community’s got your back. Happy experimenting!

    The post How to Setup Kubernetes Cluster with Minikube on Ubuntu appeared first on TecAdmin.

    Source: Read More

    Hostinger
    Facebook Twitter Reddit Email Copy Link
    Previous ArticleArch Linux: Un Piccolo Aiuto
    Next Article Distribution Release: Finnix 250

    Related Posts

    Linux

    kew v3.2.0 improves internet radio support and more

    May 9, 2025
    Linux

    GNOME Replace Totem Video Player with Showtime

    May 9, 2025
    Leave A Reply Cancel Reply

    Continue Reading

    DAT Linux is a distribution targeted at data science

    Linux

    Microsoft to make performance-based job cuts across departments, including security, impacting “less than 1%” of the workforce

    News & Updates

    Magnify your screen and more with PowerToys’ new ZoomIt tool – here’s how

    News & Updates

    Perficient’s Unique Industry Focus Continues to Capture Recognition in the Utilities Space

    Development
    GetResponse

    Highlights

    7 Best Free and Open Source Stock Tickers

    March 30, 2025

    A stock ticker is a report of the price of specific securities, updated continuously throughout…

    DuckDB: An Analytical in-Process SQL Database Management System DBMS

    June 18, 2024

    This AI Paper from Google DeepMind Explores the Effect of Communication Connectivity in Multi-Agent Systems

    June 27, 2024

    We all know how to do responsive design, right?

    November 8, 2024
    © DevStackTips 2025. All rights reserved.
    • Contact
    • Privacy Policy

    Type above and press Enter to search. Press Esc to cancel.