前言
只有一台机器,又想玩一下 istio 怎么办呢?本文将介绍如何使用 minikube 来安装 istio。
minikube 介绍
minikube的介绍如下:
https://github.com/kubernetes/minikube
Minikube 是一个 Kubernetes 发行版,在本地工作站上的虚拟机中运行。要在本地计算机上安装 Docker 引擎。
在 linux 上安装 minikube
在linux上怎么安装minikube看这里:
https://minikube.sigs.k8s.io/docs/start/linux/.
很简单,下载安装即可
curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64 \
&& sudo install minikube-linux-amd64 /usr/local/bin/minikube
安装之后就可以直接运行了。直接运行会展示 minikube 的帮助信息。
root@VM_74_51_centos ~]# minikube
Minikube is a CLI tool that provisions and manages single-node Kubernetes clusters optimized for development workflows.
Basic Commands:
start Starts a local kubernetes cluster
status Gets the status of a local kubernetes cluster
stop Stops a running local kubernetes cluster
delete Deletes a local kubernetes cluster
dashboard Access the kubernetes dashboard running within the minikube cluster
Images Commands:
docker-env Sets up docker env variables; similar to '$(docker-machine env)'
cache Add or delete an image from the local cache.
Configuration and Management Commands:
addons Modify minikube's kubernetes addons
config Modify minikube config
profile Profile gets or sets the current minikube profile
update-context Verify the IP address of the running cluster in kubeconfig.
....
启动的时候可以挂在虚拟机,所以可以检测 cpu 是否支持虚拟化。
egrep -q 'vmx|svm' /proc/cpuinfo && echo yes || echo no
上面这个命令是检测 cpu 是否支持虚拟化的。如果你是 docker 主机,cpu 是不支持虚拟化的。
Hypervisor Setup
Verify that your system has virtualization support enabled:
If the above command outputs “no”:
* If you are running within a VM, your hypervisor does not allow nested virtualization. You will need to use the None (bare-metal) driver
* If you are running on a physical machine, ens