19

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:
jonrsharpe
  • 115,751
  • 26
  • 228
  • 437
  • 1
    FYI - `minikube update-check` this command shows, your current installed version and latest available version. – MechaCode Dec 03 '21 at 13:57

5 Answers5

40

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

efkan
  • 12,991
  • 6
  • 73
  • 106
  • Thanks for auto-update script, I edited on `minikube start` command with added option `----container-runtime='containerd'` as it needed on rootless mode on my local setup. – Natta Wang Feb 25 '23 at 10:47
10

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.

ARIF MAHMUD RANA
  • 5,026
  • 3
  • 31
  • 58
  • 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. – MechaCode Dec 03 '21 at 13:54
  • This should be the accepted answer :) Works great. – Ondřej Stašek Jan 10 '22 at 14:00
  • This works; you do not need to delete everything from minikube in order to upgrade it. However, it should be noted that this will not upgrade the version of Kubernetes running on pre-existing minikube clusters ("profiles" in minikube), which can be shown with `minikube profile list` – Life5ign Jun 28 '23 at 20:21
6
$ 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
peterh
  • 11,875
  • 18
  • 85
  • 108
Madhusoodan
  • 560
  • 1
  • 6
  • 18
  • 1
    Prefix a line with 4 spaces to make it look like code, and not like text. – peterh Sep 06 '19 at 15:00
  • 1
    i followd your way but after following my minikube is crashed so can u please help me? – Muhammad Qasim Qadri Sep 07 '19 at 07:23
  • $ 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: https://github.com/kubernetes/minikube/issues/new/choose – Muhammad Qasim Qadri Sep 07 '19 at 07:24
  • $ 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: https://github.com/kubernetes/minikube/issues/new/choose – Muhammad Qasim Qadri Sep 07 '19 at 07:24
  • $ 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 Sep 08 '19 at 06:07
  • i put spaces but it remove. – Muhammad Qasim Qadri Sep 08 '19 at 06:07
  • 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 – Muhammad Qasim Qadri Sep 08 '19 at 06:10
  • @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. – PjoterS Sep 10 '19 at 07:36
  • Hey @MuhammadQasimQadri try this to resolve that error : $ minikube stop $ minikube delete $ rm -rf ~/.minikube/ $ rm -rf ~/.kube/ and then run $ minikube start – Kaustubh Desai Nov 29 '20 at 13:53
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
lyrio
  • 268
  • 1
  • 5
  • 13
1

I had the same issue. I found running minikube delete doesn't actually delete binary /usr/local/bin/minikube. Either delete it manually or you need to copy latest minikube into /usr/local/bin manually

nani21984
  • 911
  • 2
  • 13
  • 21