kubelet and apriserver stopped with minikube
Asked Answered
E

5

8

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

Emilioemily answered 12/5, 2020 at 17:45 Comment(9)
which minikube version? also can you remove ~/.kube/config file and run minikube update-context again?Handcart
minikube version: v1.9.2 commit: 93af9c1e43cab9618e301bc9fa720c63d5efa393 removed and ran the command . same error brother.Emilioemily
I see there is a bug github.com/kubernetes/minikube/issues/7437. could you please update your minikube version to v1.10.0 and try?Handcart
Yeah, try latest minikube version v1.10.0 in github.com/kubernetes/minikube/releases/tag/v1.10.0 and also do minikube stop && minikube delete before starting minikube.Hekker
Hi, can You add host OS and environment information?Featurelength
@Handcart and Vikram, now invalid memory address problem has been solved. thank you. But kubelet and apriserver stopped with minikube problem still remains.Emilioemily
@PiotrMalec my os is ubuntu 20.04, and what kind of environment info you asked? I did not understandEmilioemily
can you run minikube delete; minikube start and check?Handcart
@Emilioemily by environment i mean if its local physical machine running ubuntu, virtual machine running on cloud or virtual machine running on private desktop/laptop.Featurelength
M
12

try these commands in this order:

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

This worked from me

Mercaptide answered 29/7, 2021 at 6:31 Comment(0)
M
2

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
Mike answered 2/9, 2021 at 21:38 Comment(1)
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.Tullius
I
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
Incomprehension answered 17/3, 2021 at 12:45 Comment(0)
T
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
Transship answered 27/3, 2022 at 5:41 Comment(0)
A
0

I faced the same problem as I didn't start the Minikube yet but trying to access it, did these and solved it, so...

minikube start minikube status

if you've already started it then,

minikube stop minikube delete minikube start

Alula answered 6/12, 2023 at 18:12 Comment(1)
This does not really answer the question. If you have a different question, you can ask it by clicking Ask Question. To get notified when this question gets new answers, you can follow this question. Once you have enough reputation, you can also add a bounty to draw more attention to this question. - From ReviewCredit

© 2022 - 2024 — McMap. All rights reserved.