microk8s: microk8s is not running. microk8s.inspect showing no error
Please run microk8s.inspect and attach the generated tarball to this issue.
wtf@k8s-master:~$ microk8s.inspect Inspecting services Service snap.microk8s.daemon-cluster-agent is running Service snap.microk8s.daemon-flanneld is running Service snap.microk8s.daemon-containerd is running Service snap.microk8s.daemon-apiserver is running Service snap.microk8s.daemon-apiserver-kicker is running Service snap.microk8s.daemon-proxy is running Service snap.microk8s.daemon-kubelet is running Service snap.microk8s.daemon-scheduler is running Service snap.microk8s.daemon-controller-manager is running Service snap.microk8s.daemon-etcd is running Copy service arguments to the final report tarball Inspecting AppArmor configuration Gathering system information Copy processes list to the final report tarball Copy snap list to the final report tarball Copy VM name (or none) to the final report tarball Copy disk usage information to the final report tarball Copy memory usage information to the final report tarball Copy server uptime to the final report tarball Copy current linux distribution to the final report tarball Copy openSSL information to the final report tarball Copy network configuration to the final report tarball Inspecting kubernetes cluster Inspect kubernetes cluster
Building the report tarball Report tarball is at /var/snap/microk8s/1107/inspection-report-20200102_011315.tar.gz
inspection-report-20200102_011315.tar.gz
wtf@k8s-master:~$ microk8s.status microk8s is not running. Use microk8s.inspect for a deeper inspection.
We appreciate your feedback. Thank you for using microk8s.
About this issue
- Original URL
- State: open
- Created 4 years ago
- Reactions: 9
- Comments: 76 (5 by maintainers)
Solved it for me @gavinB-orange - had to remove my previously installed kubectl and then it microk8s started working!
rm -rf /usr/local/bin/kubectlTry refreshing the certificate
then check for microk8s status this must work
I have solved the issue. Do not run in root mode. Try running in user mode.
k8s-master@k8s-master:-$ sudo microk8s.statusEither removing and re-installing fixed the issue or the version: installed: v1.17.0 (1109) 179MB classic
As Chinese user, it may caused by GFW.
As
/var/snap/microk8s/3xxx/inspection-report/snap.microk8s.daemon-kubelite/journal.logshows:How about changing the message:
Currently:
New:
Or:
Something that would make the user think about having a misconfigured client and not necessarily microk8s dying.
@TribalNightOwl microk8s is not actually dying. The
statuscommand uses the kubeconfig settings to verify the cluster’s health. So if the kubeconfig is misconfigured it will not be able to gather kubernetes resources, hence it will saynot runningThe message can be misleading though.
I also had the same issue. It happens with v1.17 only (other versions like v1.16, v1.15, v1.14) are ok. Also, it happens with v1.17 after I try to install kubeflow using
microk8s.enable kubeflowwhich basically throws an error about Juju. To resolve that I did install Juju and lxd and didjuju bootstrapafter thismicrok8s.statusgives me microk8s not running.I reproduced this behaviour in another machine as well.
We could also detect such problems and suggest a fix in
microk8s.inspecthttps://github.com/ubuntu/microk8s/blob/master/scripts/inspect.sh#L106@balchua same question!
enviroment
After
snap install microk8s --classici checkmicrok8s status. thenmicrok8s is not running. Use microk8s inspect for a deeper inspectionBut i found processes referring microk8s
inspection-report-20220912_154441.tar.gz
I run into the same issue today. microk8s start => started microk8s status => microk8s is not running. Use microk8s inspect for a deeper inspection. microk8s inspect => shows no errors I have to say that i also had the same problem yesterday, and reinstalled both microk8s and kubectl which worked for a while but not this morning.
apparently for me it came down to the x509certificate, eg: microk8s kubectl get ns Unable to connect to the server: x509: certificate has expired or is not yet valid: current time 2022-01-13T13:02:19Z is before 2022-01-13T13:32:23Z
If I move the clock on the computer 1 hour forward everything works fine then.
I run it on an Ubuntu 20.04 laptop, set to the Automatic Date/Time and GMT timezone. Not sure what caused this, but hope this is useful.
UPD: it seems to be caused by the laptop’s RTC being misconfigured for some reason. The following command fixed it: timedatectl set-local-rtc 0
Yes definitely will run into port conflicts whether u have an already k8s running or an application using the ports. The list of ports and services are here. https://microk8s.io/docs/services-and-ports
On my system I found that the problem went away after I updated the rather too old kubectl installed in /usr/local/bin on my system. I had assumed that microk8s would exclusively use it’s own kubectl, but apparently not.
@balchua not seem working