minikube and how to debug api server error
Asked Answered
A

1

9

I dont get what is going on with minikube. Below are the steps I undertook to fix the problem with a stopped apiserver.
1) I dont know why the api server stopped. How do I debug? this folder is empty:

 --> EMPTY ~/.minikube/logs/

2) After stop I start again and minikube says all is well. I do a status check and I get apiserver: Error. So...no logs..how do I debug?

3) And finally what would cause and apiserver error?

Thanks

~$ minikube status
host: Running
kubelet: Running
apiserver: Stopped
kubectl: Correctly Configured: pointing to minikube-vm at 192.168.99.100~$ 

~$ minikube stop
Stopping local Kubernetes cluster...
Machine stopped.
~$ minikube start
Starting local Kubernetes v1.12.4 cluster...
Starting VM...
Getting VM IP address...
Moving files into cluster...
Setting up certs...
Connecting to cluster...
Setting up kubeconfig...
Stopping extra container runtimes...
Machine exists, restarting cluster components...
Verifying kubelet health ...
Verifying apiserver health .....Kubectl is now configured to use the cluster.
Loading cached images from config file.


Everything looks great. Please enjoy minikube!


~$ minikube status
host: Running
kubelet: Running
apiserver: Error
Altimetry answered 9/1, 2019 at 22:21 Comment(4)
Can you please share the logs? minikube logsRowney
you can also start the minikube with minikube start -v=7 and post the results or check if there is something that could help recognize the issue.Telegraphese
please run "minikube start" command with the extra parameters to log --alsologtostderr -v=3 for additional logging. See if that gives any additional information. And also see if the below reference help you to restart the minikube apiserver manually. #50016581Tobytobye
@Altimetry Have you tried any of the above suggestions?Neighboring
J
0

I'm having the same problem. This is on minikube version 1.33.1 running on Docker on MacOSX 14.6.1

$ minikube status
minikube
type: Control Plane
host: Running
kubelet: Running
apiserver: Stopped
kubeconfig: Configured

This problem seems to come up intermittently, usually not after a minikub delete and minikube start, but more consistently if I run minikube stop and then minikube start.

healthz check failed
I0904 14:40:50.144055    6692 api_server.go:253] Checking apiserver healthz at https://127.0.0.1:62454/healthz ...
I0904 14:40:50.243879    6692 api_server.go:279] https://127.0.0.1:62454/healthz returned 200:
ok
I0904 14:40:50.245741    6692 api_server.go:141] control plane version: v1.30.0
I0904 14:40:50.245758    6692 api_server.go:131] duration metric: took 1.102055084s to wait for apiserver health ...
I0904 14:40:50.245764    6692 system_pods.go:43] waiting for kube-system pods to appear ...
I0904 14:40:50.260253    6692 system_pods.go:59] 7 kube-system pods found
I0904 14:40:50.260274    6692 system_pods.go:61] "coredns-7db6d8ff4d-rnpg9" [c754bb3d-8858-4746-bbb5-1bb27d08f827] Running
I0904 14:40:50.260284    6692 system_pods.go:61] "etcd-minikube" [6d4433be-1c34-413c-b0d9-e9b82c04e1c8] Running / Ready:ContainersNotReady (containers with unready status: [etcd]) / ContainersReady:ContainersNotReady (containers with unready status: [etcd])
I0904 14:40:50.260293    6692 system_pods.go:61] "kube-apiserver-minikube" [985e990e-6fb5-4109-a7d0-9c8f0ca0a86f] Running / Ready:ContainersNotReady (containers with unready status: [kube-apiserver]) / ContainersReady:ContainersNotReady (containers with unready status: [kube-apiserver])
I0904 14:40:50.260302    6692 system_pods.go:61] "kube-controller-manager-minikube" [f0e0dc58-d162-4fe8-8843-64a06e6c66c6] Running / Ready:ContainersNotReady (containers with unready status: [kube-controller-manager]) / ContainersReady:ContainersNotReady (containers with unready status: [kube-controller-manager])
I0904 14:40:50.260318    6692 system_pods.go:61] "kube-proxy-hj2ck" [57d3f6b8-c92c-48c1-930e-a60e0c100743] Running / Ready:ContainersNotReady (containers with unready status: [kube-proxy]) / ContainersReady:ContainersNotReady (containers with unready status: [kube-proxy])
I0904 14:40:50.260324    6692 system_pods.go:61] "kube-scheduler-minikube" [d71cbd25-f8ce-405f-8f2a-cf9a1483c57c] Running / Ready:ContainersNotReady (containers with unready status: [kube-scheduler]) / ContainersReady:ContainersNotReady (containers with unready status: [kube-scheduler])
I0904 14:40:50.260330    6692 system_pods.go:61] "storage-provisioner" [4974c76b-112f-4fab-8066-b10f77de42ce] Running / Ready:ContainersNotReady (containers with unready status: [storage-provisioner]) / ContainersReady:ContainersNotReady (containers with unready status: [storage-provisioner])
Joggle answered 4/9 at 21:54 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.