How to update minikube latest version?

12,255

Solution 1

The script below removes everything (pods, services, secrets, etc.) that are found in Minikube, deletes old Minikube file, install latest Minikube file and then enables ingress and dashboard addons.

#! /bin/sh

# Minikube update script file

minikube delete && \ 
sudo rm -rf /usr/local/bin/minikube && \ 
sudo curl -Lo minikube https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64 && \ 
sudo chmod +x minikube && \ 
sudo cp minikube /usr/local/bin/ && \ 
sudo rm minikube && \  
minikube start &&\

# Enabling addons: ingress, dashboard
minikube addons enable ingress && \
minikube addons enable dashboard && \
minikube addons enable metrics-server && \
# Showing enabled addons
echo '\n\n\033[4;33m Enabled Addons \033[0m' && \
minikube addons list | grep STATUS && minikube addons list | grep enabled && \

# Showing current status of Minikube
echo '\n\n\033[4;33m Current status of Minikube \033[0m' && minikube status

(To make use of dashboard addons, execute the command of minikube dashboard on the terminal)

Sample terminal output after script run:

enter image description here

Solution 2

$ sudo minikube delete
$ curl -Lo minikube https://storage.googleapis.com/minikube/releases/v1.3.1/minikube-linux-amd64 && chmod +x minikube && sudo cp minikube /usr/local/bin/ && rm minikube
$ sudo minikube start --vm-driver=none

Solution 3

While updating for my Ubuntu 18.04 I did following

curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube_latest_amd64.deb
sudo dpkg -i minikube_latest_amd64.deb
minikube version # to check the version
minikube start # start minikube
minikube addons list # then check addons

For linux it saves it states at home .minikube directory so no need to delete previous minikube and then enabling addons it will automatically pick the addons and enable once it read states from .minikube directory.

Solution 4

For those running mk on windows, follow these steps : (you will get the latest version of mk)

1: minikube stop
2: choco upgrade minikube
3: visit https://github.com/kubernetes/minikube/releases --> see latest version of kubernetes supported.
4: minikube start --kubernetes-version=1.xx.x
5: choco upgrade kubernetes-cli
6: kubectl version : to verify the update
Share:
12,255
Muhammad Qasim Qadri
Author by

Muhammad Qasim Qadri

A passionate Front-end Developer 🚀 having an experience of building interactive and responsive Web applications with JavaScript / Reactjs / Firebase and some other cool libraries and frameworks

Updated on June 17, 2022

Comments

  • Muhammad Qasim Qadri
    Muhammad Qasim Qadri almost 2 years

    When I command minikube status it shows but with a GitHub link says that update minikube. Can you tell me how can I do this in a simple way?

    $ minikube status
    ⚠️  There is a newer version of minikube available (v1.3.1).  Download it here:
    https://github.com/kubernetes/minikube/releases/tag/v1.3.1
    
    To disable this notification, run the following:
    minikube config set WantUpdateNotification false
    
    host: Stopped
    kubelet: 
    apiserver: 
    kubectl:
    
  • peterh
    peterh over 4 years
    Prefix a line with 4 spaces to make it look like code, and not like text.
  • Muhammad Qasim Qadri
    Muhammad Qasim Qadri over 4 years
    i followd your way but after following my minikube is crashed so can u please help me?
  • Muhammad Qasim Qadri
    Muhammad Qasim Qadri over 4 years
    $ minikube status 💣 Error getting bootstrapper: getting kubeadm bootstrapper: command runner: getting ssh client for bootstrapper: Error dialing tcp via ssh client: dial tcp 127.0.0.1:22: connect: connection refused 😿 Sorry that minikube crashed. If this was unexpected, we would love to hear from you: 👉 github.com/kubernetes/minikube/issues/new/choose
  • Muhammad Qasim Qadri
    Muhammad Qasim Qadri over 4 years
    $ minikube status 💣 Error getting bootstrapper: getting kubeadm bootstrapper: command runner: getting ssh client for bootstrapper: Error dialing tcp via ssh client: dial tcp 127.0.0.1:22: connect: connection refused 😿 Sorry that minikube crashed. If this was unexpected, we would love to hear from you: 👉 github.com/kubernetes/minikube/issues/new/choose
  • Muhammad Qasim Qadri
    Muhammad Qasim Qadri over 4 years
    $ minikube status 💣 Error getting bootstrapper: getting kubeadm bootstrapper: command runner: getting ssh client for bootstrapper: Error dialing tcp via ssh client: dial tcp 127.0.0.1:22: connect: connection refused 😿 Sorry that minikube crashed. If this was unexpected, we would love to hear from you: 👉 github.com/kubernetes/minikube/issues/new/choose
  • Muhammad Qasim Qadri
    Muhammad Qasim Qadri over 4 years
    i put spaces but it remove.
  • Muhammad Qasim Qadri
    Muhammad Qasim Qadri over 4 years
    its easy to uinderstand the gernade emoji i 1st line then the seond line started from the cat emoji. and seond thimg is that sometimes error comes to says that error starting a new host
  • PjoterS
    PjoterS over 4 years
    @Muhammad, Question was how to upgrade minikube version. Answer is correctly. If you have issue with start minikube you should create new question with more data. Docker, minikube, kubeadm version, which platform, etc.
  • Kaustubh Desai
    Kaustubh Desai over 3 years
    Hey @MuhammadQasimQadri try this to resolve that error : $ minikube stop $ minikube delete $ rm -rf ~/.minikube/ $ rm -rf ~/.kube/ and then run $ minikube start
  • MechaCode
    MechaCode over 2 years
    above commands upgrage your minikube CLI version, and once you run command - minikube start --driver=virtualbox/docker, it will download minikube current updated version ISO image, and works fine.
  • Ondřej Stašek
    Ondřej Stašek over 2 years
    This should be the accepted answer :) Works great.