How to properly install the minikube on fedora? - installation

For two days, I am trying to install minikube but every time I run minikube start, it gives me an error that I don't understand. I am new and I read many blogs and official documents but still didn't solve it. I have installed docker, kubectl, kubeadm, kubelet, conntrack, and minikube.

Related

Local Deployment/Installation of Kubeflow on Windows

I am facing a major problem in installing Kubeflow locally on my Windows 10 Machine.
Machine Specs - OS: Windows 10, RAM: 16GB
Approaches Tried To Install
Microk8s - Not Successful
I get
Cannot Install MicroK8s properly, due to “MicroK8s not found error”, along with instance crashing.
MiniKube + Vagrant with VirtualBox - Partially Successful
“Vagrant up” is very slow. And sometimes when I manage to open the Kubeflow console locally it crashes after running a couple of experiments. Errors arise from time-to-time and it is hard to pinpoint as to why they occur.
Kind - Not Successful
Out-dated docs and tutorials. Old commands don’t work and the manifests have been moved to another repo.
K3s - Not Successful
Cannot install manifests as it has been moved to another repo. And no updated docs directing as to how we can install it.
Resources Referred:
https://kirenz.github.io/codelabs/codelabs/kubeflow-install/#4
https://www.kubeflow.org/docs/components/pipelines/installation/localcluster-deployment/
https://github.com/kubeflow/manifests
And official doc of all the Approaches taken
Digging deep what I found was that some guides say that Kubeflow 1.5.0 is not compatible with version 1.22 and onwards. And as of now there are no older releases for Kubernetes(lower than 1.22) in the official site. Is this the root cause for the issues that I am facing?
Are there any other way to install and setup Kubeflow locally for Windows? It is hard to find a guide/tutorial or a video which is not outdated.
The current https://www.kubeflow.org/docs/started/installing-kubeflow/ page suggests using a package.
None of the packages are expressly for Windows. The "Charmed Kubeflow" looked promising for an install on a Windows machine, so I went with it. Here are the steps I figured out after much trial and error.
Enable Hyper V for Windows. (If you have Windows Home, see https://www.makeuseof.com/install-hyper-v-windows-11-home/.)
https://multipass.run/install. Choose Hyper V over Virtual Box if you can. If you cannot, then finish the install while ignoring any VirtualBox related error, and then do Command prompt, multipass set local.driver=hyperv. (You may need to restart your computer here.)
Command prompt: multipass shell
Shell: exit
Command prompt: multipass stop
In the Windows program "Hyper-V Manager", select the VM. Settings:
Memory, RAM: 4096, Enable Dynamic Memory.
Processor, Number of Virtual Processors = 2.
SCSI Controller, Hard Drive, Virtual hard disk, Edit, Action: Expand, New size 50 GB.
Command prompt:
multipass start
multipass shell
Shell: (These steps are mostly from https://charmed-kubeflow.io/docs/quickstart.)
sudo snap install microk8s --classic --channel=1.21/stable
sudo usermod -a -G microk8s $USER
newgrp microk8s
sudo chown -f -R $USER ~/.kube
microk8s enable dns
microk8s enable storage
microk8s enable ingress
microk8s enable metallb:10.64.140.43-10.64.140.49
microk8s enable dashboard
Check the status until those items are enabled. Shell: microk8s status --wait-ready
Shell:
(Note: When I tried to enable istio before doing juju bootstrap microk8s, the juju bootstrap command consistently failed with the following error regardless of how much memory I allocated to the VM: failed to bootstrap model: creating controller stack: creating statefulset for controller: timed out waiting for controller pod: unschedulable: 0/1 nodes are available: 1 Insufficient memory.)
sudo snap install juju --classic
juju bootstrap microk8s
microk8s enable istio
juju add-model kubeflow
juju deploy kubeflow-lite --trust
juju config dex-auth public-url=http://10.64.140.43.nip.io
juju config oidc-gatekeeper public-url=http://10.64.140.43.nip.io
juju config dex-auth static-username=admin
juju config dex-auth static-password=admin
watch -c juju status --color
To access the Kubernetes dashboard: The Charmed Kubeflow Quickstart instructions for this will not work as-is for your Windows web browser. Try this:
Shell: microk8s dashboard-proxy. (This will keep running to serve the dashboard until you Ctrl-C cancel, close the window, or shutdown the VM.)
Command prompt: multipass list
Windows web browser: https://<ip address for the VM from multipass list>:<port number from dashboard-proxy>, copy-paste the token from dashboard-proxy
To access the Kubeflow dashboard:
Shell: microk8s kubectl port-forward -n istio-system service/istio-ingressgateway 8080:80 --address=0.0.0.0. (This will keep running to serve the dashboard until you Ctrl-C cancel, close the window, or shutdown the VM.)
Command prompt: multipass list
Windows web browser: https://<ip address for the VM from multipass list>:8080

Fatal Error: Docker daemon failed to start with Docker Desktop

I'm on MacOS 12.1. I downloaded Docker Desktop from the Docker site, but when starting it, I always get the following error:
level=error msg="Handler for GET /v1.24/services returned error: This node is not a swarm manager. Use \"docker swarm init\" or \"docker swarm join\" to connect this node to swarm and try again."
How can I resolve this problem? All the results I can find for this error already have the daemon started and working. I can't even get the daemon started. I haven't ever touched docker swarm.
Running any of the suggested commands fails because there is no running docker daemon.
Reseting to factory defaults does not resolve the issue.
Reinstalling Docker Desktop does not resolve the issue.
Reinstalling the Docker cli does not resolve the issue.
Restarting the machine does not resolve the issue.
What do I do to fix this issue?
What I ended up doing was uninstalling Homebrew. Apparently something there was causing issues, even though I didn't install Docker Desktop through brew, and made sure to uninstall all formulas that had anything to do with Docker. Exactly what caused this problem is a mystery still.
I had the same problem.
And I found this log is catched from ~/Library/Containers/com.docker.docker/Data/log/vm/dockerd.log
I try to restart Docker Desktop, but this log doesn't append any content. The strange thing is error Dialog display the same content, even time! Which means Docker Desktop never try to start docker daemon.
I try to close Wi-Fi, then Docker Desktop will start normally.
Check dockerd.log again, this print the same error with new time, but Docker Desktop running normally.
So I think there is some error relate Docker Desktop network process rather than docker daemon.
Additionally, maybe docker daemon printed this error because of network driver is overlay which require a swarm node.

Minikube with VirtualBox start not working on MacOS Monterey

I have a Minikube K8s cluster that I have been using for a while, but after updating to the latest MacOS Monterey, Minikube fails to start with the following error.
Unable to start the VM: /usr/local/bin/VBoxManage startvm minikube --type headless failed:
So apparently VirtualBox has a bug with Monterey, so I used docker as the driver
docker system prune
minikube delete
minikube start --driver=docker
Be careful while using the prune and delete commands as it'll delete your cluster and unused containers, networks, etc

Do I need to install kubectl after installing docker?

Do I need to install kubectl after installing docker? Yet docker comes with its own version of kubeCtl?
I was watching this tutorial and I saw that kubectl was installed after installing docker. Even in the Kubernetes docs they say:
Note: Docker Desktop for Windows adds its own version of kubectl to
PATH. If you have installed Docker Desktop before, you may need to
place your PATH entry before the one added by the Docker Desktop
installer or remove the Docker Desktop's kubectl.
This, to me, seems to imply that it is not uncommon to install kubectl when you have installed one that comes with docker. Why is it so?
You may want to have different version of kubectl in certain scenarios. For example you may want to interact with a remote kuberneretes cluster from the same windows system with latest version of kubectl which may not be installed with docker desktop.
It's generally recommended to have a version of kubectl which matches with the Kubernetes API Server version.

Minikube start on Mac throws certificate error when using hyperkit driver

I am getting below error when I try to start a minikube on my Mac.
Command : minikube start
invalid configuration: [unable to read client-cert
/Users/sathishkumar/.minikube/profiles/minikube/client.crt for
minikube due to open
/Users/sathishkumar/.minikube/profiles/minikube/client.crt: no such
file or directory, unable to read client-key
/Users/sathishkumar/.minikube/profiles/minikube/client.key for
minikube due to open
/Users/sathishkumar/.minikube/profiles/minikube/client.key: no such
file or directory]
What is the solution to resolve this issue?.
Try to delete and restart clean minikube. To do so, follow this process:
Delete the minikube cluster (ignore this step if this gives the same error).
$ minikube delete
Now delete the .minikube folder,
$ rm -rf $HOME/.minikube
Now, start the minikube again:
$ minikube start
Tried with
minikube start --driver=virtualbox
And it's working.
minikube start --embed-certs
for your original issue as minikube puts the certs externally to the kubeconfig by default. Using --embed-certs inlines them in the config like Docker Desktop & KinD do.

Resources