minikube start {OS type not recognized} - kubernetes

minikube start
giving below error messaage on Manjaro Deepin ( Arch Linux ).
E1002 00:02:24.832976 26272 start.go:143] Error starting host:
Temporary Error: Error configuring auth on host: OS type not
recognized.
tried it on VirtualBox with Ubuntu 16.04 and VT-X/AMD-v not enable error giving even Virtualbox preference set to VT-X/AMD-v enable.
Note : Need to fix the issue on my local machine not the virtualBox
uname -a output
Linux xxx-pc 4.9.51-1-MANJARO #1 SMP PREEMPT Wed Sep 20 10:37:40 UTC
2017 x86_64 GNU/Linux

If working on Linux, follow the steps:
Uninstall/delete all minikube related files
1. minikube delete
2. rm /usr/local/minikube
3. rm -rf ~/.minikube
Then do minikube start again. If it doesn't work uninstall & reinstall minikube.
For Windows user follow these steps:
Do minikube delete
Delete C:\Users\username\.minikube folder.
Do minikube start again.
Also, don't forget to stop all the process related to VirtualBox including VBoxHeadless before deleting minikube.

Please Enable VT-x on your computer's BIOS.
For Reference: https://kubernetes.io/docs/tasks/tools/install-minikube/

Related

Minikube: Unable to start minikube - Exiting due to DRV_NO_IP:

I am trying to create the minikube cluster, but It always fails.
Any suggestions are very welcome:
C:\WINDOWS\system32>minikube start --driver=vmware
minikube v1.16.0 on Microsoft Windows 10 Home 10.0.19042 Build 19042
Using the vmware driver based on user configuration
Starting control plane node minikube in cluster minikube
Creating vmware VM (CPUs=2, Memory=4000MB, Disk=20000MB) ...
Deleting "minikube" in vmware ...
! StartHost failed, but will try again: creating host: create: Error creating machine: Error in driver during machine creation: Machine didn't return an IP after 120 seconds, aborting
Creating vmware VM (CPUs=2, Memory=4000MB, Disk=20000MB) ...
Failed to start vmware VM. Running "minikube delete" may fix it: creating host: create: Error creating machine: Error in driver during machine creation: Machine didn't return an IP after 120 seconds, aborting
X Exiting due to DRV_NO_IP: Failed to start host: creating host: create: Error creating machine: Error in driver during machine creation: Machine didn't return an IP after 120 seconds, aborting
Suggestion: Check your firewall rules for interference, and run 'virt-host-validate' to check for KVM configuration issues. If you are running minikube within a VM, consider using --driver=none
Documentation: https://minikube.sigs.k8s.io/docs/reference/drivers/kvm2/
Related issues:
https://github.com/kubernetes/minikube/issues/4249
https://github.com/kubernetes/minikube/issues/3566
I had a similar error when setting up Minikube on Mac OS.
When I run the command minikube start I get the error below:
πŸ˜„ minikube v1.22.0 on Darwin 11.4
✨ Using the vmware driver based on existing profile
πŸ‘ Starting control plane node minikube in cluster minikube
πŸƒ Updating the running vmware "minikube" VM ...
🀦 StartHost failed, but will try again: provision: IP not found for MAC 00:0c:29:41:e9:b9 in DHCP leases
πŸƒ Updating the running vmware "minikube" VM ...
😿 Failed to start vmware VM. Running "minikube delete" may fix it: provision: IP not found for MAC 00:0c:29:41:e9:b9 in DHCP leases
❌ Exiting due to GUEST_PROVISION: Failed to start host: provision: IP not found for MAC 00:0c:29:41:e9:b9 in DHCP leases
The issue was caused by an interruption when I was creating the VMWare VM for Minikube.
I tried fixing it by deleting the existing minikube vm and creating another one using:
minikube delete
minikube start
But then I ran into another issue this time:
Exiting due to DRV_NO_IP: Failed to start host: creating host: create: Error creating machine: Error in driver during machine creation: Machine didn't return an IP after 120 seconds, aborting.
Here's how I fixed it
After multiple research, it's just best to set up minikube with docker driver which will save you all this hassle.
For Mac OS:
If you already have docker installed or docker-compose simply uninstall it using:
brew uninstall docker
brew uninstall docker-compose
Next, install Docker desktop. This will install Docker/Docker Desktop, Docker-compose and other dependencies using:
brew install --cask docker
Next, start the docker engine by opening the Docker application. Afterwhich you can confirm the docker version using:
docker --version
Finally, setup minikube using docker driver:
minikube start --driver=docker

Minikube won't start on mac

Trying to start minikube on mac. Virtualization is being provided by VirtualBox.
$ minikube start
πŸ˜„ minikube v1.1.0 on darwin (amd64)
πŸ”₯ Creating virtualbox VM (CPUs=2, Memory=2048MB, Disk=20000MB) ...
🐳 Configuring environment for Kubernetes v1.14.2 on Docker 18.09.6
❌ Unable to load cached images: loading cached images: loading image /Users/paul/.minikube/cache/images/k8s.gcr.io/kube-proxy_v1.14.2: Docker load /tmp/kube-proxy_v1.14.2: command failed: docker load -i /tmp/kube-proxy_v1.14.2
stdout:
stderr: open /var/lib/docker/image/overlay2/layerdb/tmp/write-set-542676317/diff: read-only file system
: Process exited with status 1
πŸ’£ Failed to setup certs: pre-copy: command failed: sudo rm -f /var/lib/minikube/certs/ca.crt
stdout:
stderr: rm: cannot remove '/var/lib/minikube/certs/ca.crt': Input/output error
: Process exited with status 1
😿 Sorry that minikube crashed. If this was unexpected, we would love to hear from you:
πŸ‘‰ https://github.com/kubernetes/minikube/issues/new
Trying minikube delete followed by minikube start produces the same issue.
Docker is running and is signed in.
I also deleted all machines in virtualbox after minikube delete and still get the same result.
According to What if I answer a question in a comment? I am adding answer as well since many people dont read comments.
You can try to delete local config in MINIKUBE_HOME before starting minikube
rm -rf ~/.minikube
Try
minikube delete
and
minikube start

Error Starting Minikube on Ubuntu VM VirutalBox

I do have an Ubuntu VM in VirtualBox on Windows 10. If i follow the instructions to install Minikube I get a start error:
> minikube start &
[1] 4297
vagrant#ubuntu-xenial:~$ o minikube v0.35.0 on linux (amd64)
> Creating virtualbox VM (CPUs=2, Memory=2048MB, Disk=20000MB) ...
# Downloading Minikube ISO ...
184.42 MB / 184.42 MB [============================================] 100.00%
0s
! Unable to start VM: create: precreate: VBoxManage not found. Make sure
VirtualBox is installed and VBoxManage is in the path
Does it mean i need to install VirtualBox in the Ubuntu VM too? Kind of VB inside VB..
thanks
I'd recommend to install Minikube on your host OS (Windows) and use the already installed Virtual box as a hypervisor provider.
If for any reason you want to launch it on Ubuntu VM, there are two options:
I. Minikube supports a --vm-driver=none option that runs the Kubernetes components on the host and not in a VM. Using this driver requires Docker and a Linux environment, but not a hypervisor. In this case you have to provide an address to you local API server
`minikube start --vm-driver=none --apiserver-ips 127.0.0.1 --apiserver-name localhost`
And then go and edit ~/.kube/config, replacing the server IP that was
detected from the main network interface with "localhost". For example:
apiVersion: v1
clusters:
- cluster:
certificate-authority-data:/home/asuh/.minikube/ca.crt
server: https://localhost:8443
name: minikube
II. Install VM Ware on Windows and run Ubuntu within installed Virtualbox
and and enabled VT-X/AMD-v in outer VM.
Regarding the error you have at the moment:
However now i get another error like: /usr/local/bin/minikube: cannot
execute binary file
Make sure you have installed a proper version of Minikube. For your Ubuntu VM it should be
curl -Lo minikube https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64 \
&& chmod +x minikube
It is not recommended to use VM inside VM to run minikube. Check this answer. Try to run minikube with no vm drivers.
minikube start --vm-driver=none
I have read on minikube issues, but can not find it right now.
HTH

Minikube Start Error (Kubernetes) When Using hyperv Driver on Windows server 2016

I am trying to install Kubernetes on windows server 2016.
I tried to install minikube, and got some errors.
This is the tutorial that I followed:
https://www.assistanz.com/installing-minikube-on-windows-2016-server/
This is the command + error that I got:
PS C:\Windows\system32> minikube start –vm-driver=hyperv –hyperv-virtual-switch=Minikube
Starting local Kubernetes v1.10.0 cluster...
Starting VM... Downloading Minikube ISO
170.78 MB / 170.78 MB [============================================] 100.00% 0s
E1106 19:29:10.616564 11852 start.go:168] Error starting host: Error creating host: Error executing step: Running precreate checks.
: VBoxManage not found. Make sure VirtualBox is installed and VBoxManage is in the path.
Retrying.
E1106 19:29:10.689675 11852 start.go:174] Error starting host: Error creating host: Error executing step: Running precreate checks.
: VBoxManage not found. Make sure VirtualBox is installed and VBoxManage is in the path
================================================================================
An error has occurred. Would you like to opt in to sending anonymized crash
information to minikube to help prevent future errors?
To opt out of these messages, run the command:
minikube config set WantReportErrorPrompt false
================================================================================
Please enter your response [Y/n]:
Someone knows how to solve it?
I googled it, but no luck.
Thanks!
I was never able to get the config parameters to work with minikube start.
I was able to get past this error using the minikube config commands in PowerShell (should also work at a command prompt):
minikube config set vm-driver hyperv
minikube config set hyperv-virtual-switch ExternalSwitch
minikube config view
minikube delete
minikube start
For more information on the command run: minikube config -h
Looking at the documentation you have provided, I have noticed that the screenshot shows a slight difference to the one they've quote.
I have also found this command in another piece of documentation from kubernetes here, showing the same command as that from the screenshot.
I suggest you try the following command;
minikube start --vm-driver=hyperv --hyperv-virtual-switch=Minikube
It is true that OP has pasted the incorrect command, because there is - instead of --. I tried to pass this arguments to minikube and all you get is an instant error. So the issue must be somewhere else. I remember having similar issue and it got resolved after deleting the .kube and .minikube folders and trying to run it again.
After taking a closer look this tutorial is destined for installation of minikube inside of a Windows Server 2016 Virtual Machine, so you have to have a Nested Virtualization able hardware:
Prerequisites The Hyper-V host and guest must both be Windows Server
2016/Windows 10 Anniversary Update or later. VM configuration version
8.0 or greater. An Intel processor with VT-x and EPT technology -- nesting is currently Intel-only. There are some differences with
virtual networking for second-level virtual machines. See "Nested
Virtual Machine Networking".
So the main question is, is that true in your scenario? Are you trying to perform your steps on Windows Server Hyper-V virtual machine with nested virtualization feature?
If you confirm that I have technical possibilities to check it in that scenario.
Otherwise I recommend using the "traditional way" of running minikube in Windows, according for example to this tutorial.

Virtualbox running inside Linux Mint : issue with minikube credentials

On my laptop I have Linux Mint OS. Details as below:
Mint version 19,
Code name : Tara,
PackageBase : Ubuntu Bionic
Cinnamon (64-bit)
I have installed kubectl binary using curl from this reference site: https://kubernetes.io/docs/tasks/tools/install-kubectl/
commands used for kubectl installation:
curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl
chmod +x ./kubectl
sudo mv ./kubectl /usr/local/bin/kubectl
installed minikube on local linux machine using the link:
https://github.com/kubernetes/minikube/releases
command used for minikube installation:
curl -Lo minikube https://storage.googleapis.com/minikube/releases/v0.29.0/minikube-linux-amd64 && chmod +x minikube && sudo cp minikube /usr/local/bin/ && rm minikube
Downloaded this VirtualBox 5.2.18 for Linux Ubuntu 18.04 / Debian 10 AMD64 from https://www.virtualbox.org/wiki/Downloads
THen I lanuched virtualbox manager. There is no virtual machine created.
Then followed quickstart guide on my local Linux Mint machine:
https://github.com/kubernetes/minikube/blob/v0.29.0/README.md
On my local Linux mint machine under downloads directory, the moment I run command "minikube start" :
xxxxxxxx:~/Downloads$ minikube start
Starting local Kubernetes v1.10.0 cluster...
Starting VM...
Downloading Minikube ISO
171.87 MB / 171.87 MB [============================================] 100.00% 0s
Getting VM IP address...
Moving files into cluster...
Downloading kubeadm v1.10.0
Downloading kubelet v1.10.0
Finished Downloading kubelet v1.10.0
Finished Downloading kubeadm v1.10.0
Setting up certs...
Connecting to cluster...
Setting up kubeconfig...
Starting cluster components...
Kubectl is now configured to use the cluster.
Loading cached images from config file.
Though I am running minikue start command on my local Linux machine, it says its starting minikube in virtualmachine inside Oracle virtualbox manager.
My first question is HOW? Is there any specific setting that is being done behind the scenes to have minikube getting started in VM installed on my operating system (in this case I am on Linux mint 19)
minikube getting started in VM
If I double click on minikube running on VM, then it opens up a screen where it asks me logging to minikube. Please see below screenshot.
minikube asking credentials
My second question is: I haven't set any credentials for minikube. What could be the credentials? Is there any way to set credentials?
UPDATE 1
As per comment by #Rico , for his 2nd point, he said "to connect to minikube VM you can run minikube ssh" isn't it same like what I showed in 2nd attached screenshot in my issue? I mean double click on minikube VM running inside oracle virtualbox manager and that pops up screen asking for login credentials.
However, I tried to use command: minikube ssh on my local machine after starting minikube.
xxxxxxxxxxxxxx:~$ minikube ssh
_ _
_ _ ( ) ( )
___ ___ (_) ___ (_)| |/') _ _ | |_ __
/' _ ` _ `\| |/' _ `\| || , < ( ) ( )| '_`\ /'__`\
| ( ) ( ) || || ( ) || || |\`\ | (_) || |_) )( ___/
(_) (_) (_)(_)(_) (_)(_)(_) (_)`\___/'(_,__/'`\____)
$ ls
$ pwd
/home/docker
$ docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
k8s.gcr.io/coredns 1.2.2 367cdc8433a4 4 weeks ago 39.2MB
k8s.gcr.io/kubernetes-dashboard-amd64 v1.10.0 0dab2435c100 5 weeks ago 122MB
k8s.gcr.io/kube-apiserver-amd64 v1.10.0 af20925d51a3 6 months ago 225MB
k8s.gcr.io/kube-controller-manager-amd64 v1.10.0 ad86dbed1555 6 months ago 148MB
k8s.gcr.io/kube-scheduler-amd64 v1.10.0 704ba848e69a 6 months ago 50.4MB
k8s.gcr.io/etcd-amd64 3.1.12 52920ad46f5b 6 months ago 193MB
k8s.gcr.io/kube-addon-manager v8.6 9c16409588eb 7 months ago 78.4MB
k8s.gcr.io/k8s-dns-kube-dns-amd64 1.14.8 80cc5ea4b547 8 months ago 50.5MB
k8s.gcr.io/pause-amd64 3.1 da86e6ba6ca1 9 months ago 742kB
k8s.gcr.io/echoserver 1.4 a90209bb39e3 2 years ago 140MB
$
It didn't ask me any credentials.
So should I say that "Minikube uses boot2docker as its base image, so the default SSH login to the VM ends up being docker:tcuser"
UPDATE 2
As per #Rico: "basically when you do minikube ssh it connects to the VM using private/public key authentication" - I agree. It didn't ask me any credentials when I did "minikube ssh" command from my host machine.
also as per point 1: "with command 'minikube start' it starts the VM that has all the kubernetes components in it" - So for this I went ahead and tried to run any kubectl command after ssh ing into minikube and its saying command not found.
$ kubectle get pods
-bash: kubectle: command not found
However it does recognize docker command
$ docker --version
Docker version 17.12.1-ce, build 7390fc6
I also tried to find VM details
$ uname -a
Linux minikube 4.15.0 #1 SMP Thu Sep 27 17:28:06 UTC 2018 x86_64 GNU/Linux
The short answer, minkube downloads a VM image to your host machine, in this case, Mint Linux for you then it starts the VM that has all the kubernetes components in it.
Credentials can be from any user in the VM OS. To connect to the minikube VM you can run minikube ssh from your host. From there you can run something like sudo adduser to add any user you like and set the credentials that you'd like too.
Note: when you run minikube ssh you connect to the VM using ssh and it uses private/public key ssh authentication.
As a based image Minikube uses boot2docker, and default login details are docker:tcuser, you can also login using minikube ssh and tokens created by Minikube will be used to login without prompting for your login details.
You should first remove the old cluster minikube delete and create a new one minikube start.
You do not need to have VirtualBox installed as Minikube will stat it's own VM.
Of course, you can specify which VM driver should be used, using minikube start --vm-driver=virtualbox.
Please read the instructions provided on kubernetes.io regarding Minikube installation.
Thanks Shivraj and Rico for the posting questions and replies. They were badly needed.
To your problem Shivraj, please fire the kubectl commands on host machine.
I have also done a similar setup on my laptop with minikube creating a Linux VM for me. Docker images are running within the VM and kubectl is on the host machine.
I am following the link below; issuing kubectl commands on my host and is working perfectly fine.
Hope it helps.