Using Minikube on osx
Docker compose is making for me wonders when it comes to run some simple components on my workstation.
Spawning and simulating an infrastructure locally is fast and takes no time. Also it is lightweight. However most teams nowadays use Kubernetes.
If you want to simulate a Kubernetes environment locally the tool to use is Minikube.
With Minikube you need to have a vm running on your workstation. This is normal, after all your workloads in a Kubernetes environment are running on multiple VMs.
So if you use OSX it’s very simple, provided you have a hypervisor installed (my default one is VirtualBox)
I just went for the local library option.
1 2 3 | curl -Lo minikube https: //storage .googleapis.com /minikube/releases/latest/minikube-darwin-amd64 \ && chmod +x minikube sudo mv minikube /usr/local/bin |
Depending on your workstation your installation varies but is still an easy one.
So let’s get started
1 | minikube start |
Now you might face a challenge with Minikube on osx.
1 2 3 4 5 | Progress state: NS_ERROR_FAILURE VBoxManage: error: Failed to create the host-only adapter VBoxManage: error: VBoxNetAdpCtl: Error while adding new interface: failed to open /dev/vboxnetctl : No such file or directory VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component HostNetworkInterfaceWrap, interface IHostNetworkInterface VBoxManage: error: Context: "RTEXITCODE handleCreate(HandlerArg *)" at line 94 of file VBoxManageHostonly.cpp |
As you can understand you need to reinstall VirtualBox. However you might face a challenge with the installation. I was getting the error ‘The installation failed’. As explained here you need to edit your osx security settings and allow ‘System software from Oracle’ to load.
At the end just do.
1 2 3 4 5 | > minikube status host: Running kubelet: Running apiserver: Running kubectl: Correctly Configured: pointing to minikube-vm at 192.168.99.100 |
and you are ready to go.
Published on System Code Geeks with permission by Emmanouil Gkatziouras, partner at our SCG program. See the original article here: Using Minikube on osx Opinions expressed by System Code Geeks contributors are their own. |