Minikube¶
In this article
Information
Minikube is a command line utility that allows you to easily deploy a local Kubernetes cluster. It is useful for developers who need a local Kubernetes environment for testing and application development.
Minikube. Key Features¶
- Quickly launch a local Kubernetes cluster - minikube allows you to launch a single-node Kubernetes cluster on a local machine in just a few minutes. You don't need to go through complex configuration or set up a full-blown multi-node cluster.
- Support for different virtualization drivers - A minikube cluster can run inside VirtualBox, Hyper-V, VMware and natively on Linux, macOS and Windows. This gives you flexibility in how you deploy it.
- Automatic kubectl configuration - once the cluster is started, minikube automatically configures kubectl to connect to it. There is no need to manually configure the Kubernetes client.
- Built-in dashboard and applications - the dashboard, heapster, ingress controller and other useful tools are added to the cluster out of the box. This speeds up getting started.
- Convenient management commands - minikube start, stop, delete and other commands make it easy to manage the cluster lifecycle right from the terminal.
- Network isolation modes - it is possible to start the cluster in host-only network mode to isolate it from the main network.
- Add-on support - additional features such as monitoring, logging, visualization, etc. can be enabled via add-ons.
- Integration with cloud services - kubectl and dashboard can be customized to work with remote clusters in the cloud.
Deployment Features¶
- Installation on Ubuntu desktop possible.
Getting started after deploying Minikube¶
A notification will be sent to the e-mail specified during registration that the server is ready for work after paying for the order. It will contain the IP address of the VPS, as well as the login and password for the connection.
Clients of our company manage the hardware in the server`s and API control panel — Invapi.
You can find the authorization data either in the Info >> 'Tags tab of the server control panel or in the email that was sent.
- Password: Sent to your email address after the server is ready for use following software deployment.
To work with the service, you must connect to the server via SSH:
Then run the start
command, which will automatically create a local Kubernetes cluster using multiple Docker containers and the latest stable version of Kubernetes:
The command will take some time to run and should output information that kubectl is configured.
Note
If you need to run minikube with a non-standard Kubernetes version to check compatibility, you can use the minikube start
command with the --kubernetes-version
parameter, e.g. v1.2.3
.
Installing minikube via Homebrew also installs kubectl, the main command-line tool for managing Kubernetes clusters. You can now run the kubectl get
command, as you would for any other Kubernetes cluster, to list all running pods:
The -A
parameter returns pods from all namespaces. ,
After performing the above steps, a local Kubernetes cluster will be created and you can work with it using standard Kubernetes tools such as kubectl.
You can use the command to access the Dashboard:
Once executed, a link will be displayed, e.g,http://127.0.0.1:42049/api/v1/namespaces/kubernetes-dashboard/services/http:kubernetes-dashboard:/proxy/
. It should be edited - enter the IP address of the server and then proceed to view the dashboard. Service Creation¶
By default, pod is only accessible from an internal IP address within the Kubernetes cluster. To make the hello-node container available outside the Kubernetes virtual network, you need to expose pod as a Kubernetes service.
You can make the subnet accessible from the public Internet by using the command kubectl expose
:
The --type=LoadBalancer
flag indicates that the service should be visible outside the cluster.
The application code in the test image only listens on TCP port 8080. If you set the application to be available on a different port in the kubectl expose
command, clients will not be able to connect to that port.
You can check the created service with the command:
The conclusion would be something like this:NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
hello-node LoadBalancer 10.108.144.78 <pending> 8080:30369/TCP 21s
kubernetes ClusterIP 10.96.0.1 <none> 443/TCP 23m
For cloud providers that support load balancers, an external IP address is provided to access the service. In Minikube, the LoadBalancer type makes the service available through the minikube service command.
Run the command:
The command opens a browser window that runs the application and displays its response.
Note
For detailed information about the basic settings of Minikube see documentation of the developers.
Ordering a server with Minikube using the API¶
To install this software using the API, follow these instructions.