CentOS7 使用minikube 搭建kubernetes 学习环境

2021-03-02 05:26

阅读:474

Windows 10 系统

VirtualBox 6.0.x

CentOS7启动在虚拟机上

先要安装docker,官网(https://docs.docker.com/engine/install/)有guide,一步步下来很简单,不多说了

按照minikube 官网(https://minikube.sigs.k8s.io/docs/start/#install-a-hypervisor)的guide先安装minikube

  1. curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64
  2. sudo install minikube-linux-amd64 /usr/local/bin/minikube

之后就直接执行了启动命令

minikube start

结果报错

* Exiting due to PROVIDER_VIRTUALBOX_NOT_FOUND: The ‘virtualbox‘ provider was not found: unable to find VBoxManage in $PATH

需要安装VirtualBox, 需要virtualbox的驱动, 我的方法很简单,直接官网()下rpm包,然后安装

  1. wget https://download.virtualbox.org/virtualbox/6.0.4/VirtualBox-6.0-6.0.4_128413_el7-1.x86_64.rpm
  2. yum install VirtualBox-6.0-6.0.4_128413_el7-1.x86_64.rpm

接着又尝试启动minikube

minikube start

报错

 If you are running minikube within a VM, consider using --driver=none

再执行

minikube start --driver=none

又再报错

Exiting due to GUEST_MISSING_CONNTRACK: Sorry, Kubernetes 1.19.2 requires conntrack to be installed in root‘s path

安装conntrack

yum install conntrack

再执行

minikube start --driver=none

这次可以了


评论


亲,登录后才可以留言!