7

I am completely new in Kubernetes.I was trying to play with minikube in my local machine. I have installed kubectl and minikube locally. When I run

minikube start --vm-driver=virtualbox # and then 
minikube status

my output is

E0512 23:33:45.964815   23423 status.go:233] kubeconfig endpoint: extract IP: "minikube" 
does not appear in  /.kube/config
m01
host: Running
kubelet: Stopped
apiserver: Stopped
kubeconfig: Misconfigured
WARNING: Your kubectl is pointing to stale minikube-vm. 
To fix the kubectl context, run `minikube update-context`

When I ran minikube update-context the output is

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0x148ecb0]
..... and more 

Can anybody help? Thanks in advance

Sazzad
  • 773
  • 11
  • 22
  • 1
    which minikube version? also can you remove `~/.kube/config` file and run `minikube update-context` again? – hoque May 12 '20 at 17:57
  • `minikube version: v1.9.2` `commit: 93af9c1e43cab9618e301bc9fa720c63d5efa393` removed and ran the command . same error brother. – Sazzad May 12 '20 at 18:00
  • I see there is a bug https://github.com/kubernetes/minikube/issues/7437. could you please update your minikube version to v1.10.0 and try? – hoque May 12 '20 at 18:02
  • 2
    Yeah, try latest minikube version v1.10.0 in https://github.com/kubernetes/minikube/releases/tag/v1.10.0 and also do `minikube stop && minikube delete` before starting minikube. – Vikram Hosakote May 12 '20 at 20:48
  • Hi, can You add host OS and environment information? – Piotr Malec May 13 '20 at 15:56
  • @hoque and Vikram, now invalid memory address problem has been solved. thank you. But kubelet and apriserver stopped with minikube problem still remains. – Sazzad May 13 '20 at 17:36
  • @PiotrMalec my os is ubuntu 20.04, and what kind of environment info you asked? I did not understand – Sazzad May 13 '20 at 17:38
  • can you run `minikube delete; minikube start` and check? – hoque May 13 '20 at 20:57
  • @Sazzad by environment i mean if its local physical machine running ubuntu, virtual machine running on cloud or virtual machine running on private desktop/laptop. – Piotr Malec May 14 '20 at 15:11

4 Answers4

9

try these commands in this order:

  1. minikube stop
  2. minikube delete
  3. minikube start

This worked from me

Hugo Valenza M
  • 169
  • 1
  • 6
1

this happens when kubeconfig is misconfigureed. so you'll need to export kubeconfig path and then do a minikube start

export KUBECONFIG=$HOME/.kube/config

echo 'export KUBECONFIG=$HOME/.kube/config' >> $HOME/.bashrc

minikube start

minikube status
  • 2
    Welcome to StackOverflow. While this code may answer the question, providing additional context regarding *how* and/or *why* it solves the problem would improve the answer's long-term value. – Sven Eberth Sep 04 '21 at 23:30
0

I closed my laptop where i had minikube running in virtual box.

When i restarted my laptop and ran the minikube vm in virtual box interface, the kubelet and apiserver was showing stopped.

Then I had to stop and start the minkube from cli and post this the two services started showing up.

Previously>>>

PS C:\Users\mazumdar> minikube status
minikube
type: Control Plane
host: Running
kubelet: Stopped
apiserver: Stopped
kubeconfig: Configured
timeToStop: Nonexistent

Post>>>>>>

PS C:\Users\mazumdar> minikube stop
* Stopping node "minikube"  ...
* 1 nodes stopped.
PS C:\Users\mazumdar>
PS C:\Users\mazumdar>
PS C:\Users\mazumdar> minikube start
* minikube v1.18.1 on Microsoft Windows 10 
* Using the virtualbox driver based on existing profile
* Starting control plane node minikube in cluster minikube
* Restarting existing virtualbox VM for "minikube" ...
* Preparing Kubernetes v1.20.2 on Docker 20.10.3 ...
* Verifying Kubernetes components...
  - Using image gcr.io/k8s-minikube/storage-provisioner:v4
* Enabled addons: storage-provisioner, default-storageclass
* Done! kubectl is now configured to use "minikube" cluster and "default" namespace by default
PS C:\Users\mazumdar>
PS C:\Users\mazumdar>
PS C:\Users\mazumdar> minikube status
minikube
type: Control Plane
host: Running
kubelet: Running
apiserver: Running
kubeconfig: Configured
timeToStop: Nonexistent
0

I'm using ubuntu 21.10 (kernel - 5.13.0-37-generic)

I have used minikube stop minikube start

it restarted my existing minikube host

if we include minikube delete it will stop and delete the existing minikube host and will create a new one when "minikube start " is executed.

praba@prabasden:**~$ minikube stop**
✋  Stopping node "minikube"  ...strong text
  1 node stopped.
praba@prabasden:**~$ minikube start**
  minikube v1.25.2 on Ubuntu 21.10
✨  Using the kvm2 driver based on existing profile
  Starting control plane node minikube in cluster minikube
  Restarting existing kvm2 VM for "minikube" ...
  Preparing Kubernetes v1.23.3 on Docker 20.10.12 ...
    ▪ kubelet.housekeeping-interval=5m
  Verifying Kubernetes components...
    ▪ Using image gcr.io/k8s-minikube/storage-provisioner:v5
  Enabled addons: storage-provisioner, default-storageclass
  Done! kubectl is now configured to use "minikube" cluster and "default" namespace by default
praba@prabasden:**~$ minikube status**
minikube
type: Control Plane
host: Running
kubelet: Running
apiserver: Running
kubeconfig: Configured