Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to completely purge minikube config or reset IP back to 192.168.99.100

I want to completely purge Minikube so that I could start over as if I installed it for the first time to avoid some configuration clashes. Mailnly to have initial IP 192.168.99.100, unfortunatelly it increases on next minikube start to 192.168.99.101, etc. I've run to delete Minikube:

minikube delete rm -rf ~/.minikube rm -rf ~/.kube

I'm running minikube version: v0.31.0 on Ubuntu 18.04 with driver VirtualBox 5.2.18

like image 569
Sobik Avatar asked Dec 20 '18 14:12

Sobik


People also ask

How do I reset my minikube?

If you want to wipe out your local Minikube cluster and restart, it is very easy to do so. Issuing a command to delete and then start Minikube will wipe out the environment and reset it to a blank slate: minikube deleteDeleting local Kubernetes cluster...

What is the IP of minikube?

$ minikube service hello-minikube1 --url http://127.0.0.1:57123 ❗ Because you are using a Docker driver on darwin, the terminal needs to be open to run it.

Is minikube IP static?

Currently minikube does not support assigning a static IP to the cluster. There's a feature request for it on K8s Github: #951 Support for Predictable IP's Across Restarts. You can follow it to check it's development. It won't assign a static IP but it will maintain the IP when your minikube restarts, so it could help.

How do I change memory on minikube?

If you are running minikube on Virtualbox you can open Virtualbox, right click on minikube's image then close > power off. Once the VM is turned off you can then go in Settings > System and modify the default memory allocated to minikube (which seems to be 4GB).


1 Answers

I found this problem on the Mac with VirtualBox as well. I tried removing the Host Network Manager, but it did not work for me. However, I did find another solution.

After issuing minikube delete, I removed the following file:

/Users/{username}/Library/VirtualBox/HostInterfaceNetworking-vboxnet0-Dhcpd.leases

Starting minikube again reset the address to .100.

File contents:

<?xml version="1.0"?>
<Leases version="1.0">
  <Lease mac="08:00:27:66:6a:19" id="01080027666a19" network="0.0.0.0" state="expired">
    <Address value="192.168.99.102"/>
    <Time issued="1555277299" expiration="1200"/>
  </Lease>
  <Lease mac="08:00:27:08:03:a3" id="010800270803a3" network="0.0.0.0" state="expired">
    <Address value="192.168.99.101"/>
    <Time issued="1555276993" expiration="1200"/>
  </Lease>
  <Lease mac="08:00:27:32:ed:f8" id="0108002732edf8" network="0.0.0.0" state="expired">
    <Address value="192.168.99.100"/>
    <Time issued="1555276537" expiration="1200"/>
  </Lease>
</Leases>
like image 156
user3137124 Avatar answered Oct 29 '22 17:10

user3137124