码迷,mamicode.com
首页 > Web开发 > 详细

centos7.5安装minikube kubernetes

时间:2019-03-27 16:51:06      阅读:654      评论:0      收藏:0      [点我收藏+]

标签:Kubernete   chmod   ||   centos   erro   googl   info   not   bec   

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

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

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

1.安装minikube

[root@localhost ~]# 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

[root@localhost 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
[root@localhost yum.repos.d]# mv kubectl /usr/local/bin/

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

技术图片

 

3.配置变量

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

4.启动minikube

[root@localhost 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

标签:Kubernete   chmod   ||   centos   erro   googl   info   not   bec   

原文地址:https://www.cnblogs.com/pu20065226/p/10608562.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!