centos7.5安装minikube kubernetes

Posted pu20065226

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了centos7.5安装minikube kubernetes相关的知识,希望对你有一定的参考价值。

前提:已安装centos7.5安装VirtualBox

Minikube是什么?
Minikube是一种方便在本地运行Kubernetes的工具. 
Minikube 是可以在VM中运行单节点的Kubernetes集群. 
Minikube是为了开发或测试在本地启动一个节点的kubernetes集群.

特点
不能启动生产集群,没有高可用性的单节点机器. 
可以工作在Windows,Linux,MacOS下

1.安装minikube

[[email protected] ~]# curl -Lo minikube https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64 && chmod +x minikube && sudo mv minikube /usr/local/bin/
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 38.2M  100 38.2M    0     0   671k      0  0:00:58  0:00:58 --:--:-- 1640k

2.安装kubectl

[[email protected] yum.repos.d]# curl -Lo kubectl https://storage.googleapis.com/kubernetes-release/release/v1.10.3/bin/linux/amd64/kubectl && chmod +x kubectl
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 51.7M  100 51.7M    0     0  1421k      0  0:00:37  0:00:37 --:--:-- 1762k
[[email protected] yum.repos.d]# mv kubectl /usr/local/bin/

此处获取稳定版本可直接在浏览器IE中输入https://storage.googleapis.com/kubernetes-release/release/stable.txt

技术图片

 

3.配置变量

[email protected] network-scripts]# export MINIKUBE_WANTUPDATENOTIFICATION=false
[[email protected] network-scripts]# export MINIKUBE_WANTREPORTERRORPROMPT=false
[[email protected] network-scripts]# export MINIKUBE_HOME=$HOME
[[email protected] network-scripts]# export CHANGE_MINIKUBE_NONE_USER=true
[[email protected] network-scripts]# mkdir $HOME/.kube || true
mkdir: cannot create directory ‘/root/.kube’: File exists
[[email protected] network-scripts]# touch $HOME/.kube/config
[[email protected] network-scripts]# export KUBECONFIG=$HOME/.kube/config
[[email protected] network-scripts]# echo $MINIKUBE_WANTUPDATENOTIFICATION
false
[[email protected] network-scripts]# echo $MINIKUBE_WANTREPORTERRORPROMPT
false[[email protected] network-scripts]# echo $MINIKUBE_HOME
/root
[[email protected] network-scripts]# echo $CHANGE_MINIKUBE_NONE_USER
true
[[email protected] network-scripts]# ls $HOME/.kube/
config
[[email protected] network-scripts]# echo $KUBECONFIG
/root/.kube/config

4.启动minikube

[[email protected] network-scripts]# minikube start --vm-driver=virtualbox
o   minikube v0.35.0 on linux (amd64)
>   Creating virtualbox VM (CPUs=2, Memory=2048MB, Disk=20000MB) ...
!   Unable to start VM: create: precreate: This computer doesnt have VT-X/AMD-v enabled. Enabling it in the Bios is mandatory

*   Sorry that minikube crashed. If this was unexpected, we would love to hear from you:
-   https://github.com/kubernetes/minikube/issues/new

 

以上是关于centos7.5安装minikube kubernetes的主要内容,如果未能解决你的问题,请参考以下文章

minikube 安装

k8s学习——minikube与kubernetes安装与启动

新手入门 keburnetes安装 Minikube

安装指定版本的minikube

CentOS 7安装minikube

minikube安装