Tag: Kubernetes

  • Install & Uninstall Minikube (Ubuntu 22.04.2 LTS)

    Install & Uninstall Minikube (Ubuntu 22.04.2 LTS)

    In this guide, we will explore the process of installing and uninstalling Minikube on Ubuntu 22.04.2 LTS.

    Install Minikube

    Minikube Installation

    I’ve used the official Minikube start documentation. This was the output:

    
    
    # Installation for Ubuntu 22.04.2 LTS, x86-64
    curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube_latest_amd64.deb
    sudo dpkg -i minikube_latest_amd64.deb

    # Start your cluster
    minikube start

    You’ll receive an error because you’ll need to specify a driver. The recommended driver is Docker. The next section will go over installing Docker.

    Install Docker

    Let’s use Docker as our driver for Minikube. I used the official Docker documentation to get Docker installed.

    After installing Docker, do these post-setup configuration.

    Deploy Kubernetes

    Finally, run the following based on the Minikube documentation:

    
    
    # Set Docker as default.
    minikube config set driver docker

    # Start Minikube with Docker as the driver.
    minikube start

    # Alias kubectl
    alias kubectl="minikube kubectl --"
    alias k="minikube kubectl --"

    Uninstall Minikube

    Use the following documentation to delete Minikube.

    
    
    minikube delete --all --purge

    Resources

    The following resources were used to develop this guide.

  • Install & Uninstall Microk8s (Ubuntu 22.04.2 LTS)

    Install & Uninstall Microk8s (Ubuntu 22.04.2 LTS)

    The instructions to remove Microk8s are for Ubuntu 22.04.2 LTS but may work with other Ubuntu versions. See Microk8s documentation for more info.

    If you find any errors in this post, please contact me.

    Remove Microk8s

    I’ve ran into several errors removing Microk8s. I found that you have to reset Microk8s first and then remove. The official documentation for resetting Microk8s can be found here.

    The cleanest way to remove Microk8s:

    
    
    # Reset Microk8s
    ## https://microk8s.io/docs/command-reference#heading--microk8s-reset
    sudo microk8s reset

    # Remove Microk8s
    sudo snap remove microk8s

    Install Microk8s

    Reinstall Microk8s with the following:

    
    
    # Install Microk8s
    ## https://microk8s.io/docs/getting-started
    sudo snap install microk8s --classic --channel=1.27

    # Join your user to microk8s Linux group
    sudo usermod -a -G microk8s $USER
    sudo chown -f -R $USER ~/.kube

    # The rest of the commands are optional but good to run for verification:
    ## https://microk8s.io/docs/getting-started