安装过程

先安装minikube,使用下面命令(由于墙的问题,所以指定国内的地址)

curl -Lo minikube http://kubernetes.oss-cn-hangzhou.aliyuncs.com/minikube/releases/v0.30.0/minikube-darwin-amd64 && chmod +x minikube && sudo mv minikube /usr/local/bin/

随后启动,需要本机安装了虚拟机(如virtualbox vm等,默认使用vb的驱动),使用下面命令启动

minikube start --vm-driver=virtualbox --registry-mirror=https://registry.docker-cn.com

排错

有时候会提示各种错误,先删除相关文件,再重新执行上面命令即可。删除文件的命令为

rm -rf ~/.minikube

偶尔提示下面错误

打开virtualbox会看到几个未被清理的minikube虚拟机,手动删除后再删除相关文件,重新执行即可。

使用

使用下列命令可以打开控制面板,自动跳转浏览器查看

minikube dashboard

使用下面命令可以查看虚拟机ip

minikube ip

查看状态使用下面命令

minikube status

其他命令可以使用minikube —help查看帮助,如下

➜  bin minikube --help
Minikube is a CLI tool that provisions and manages single-node Kubernetes clusters optimized for development workflows. Usage:
minikube [command] Available Commands:
addons Modify minikube's kubernetes addons
cache Add or delete an image from the local cache.
completion Outputs minikube shell completion for the given shell (bash or zsh)
config Modify minikube config
dashboard Access the kubernetes dashboard running within the minikube cluster
delete Deletes a local kubernetes cluster
docker-env Sets up docker env variables; similar to '$(docker-machine env)'
help Help about any command
ip Retrieves the IP address of the running cluster
logs Gets the logs of the running instance, used for debugging minikube, not user code
mount Mounts the specified directory into minikube
profile Profile sets the current minikube profile
service Gets the kubernetes URL(s) for the specified service in your local cluster
ssh Log into or run a command on a machine with SSH; similar to 'docker-machine ssh'
ssh-key Retrieve the ssh identity key path of the specified cluster
start Starts a local kubernetes cluster
status Gets the status of a local kubernetes cluster
stop Stops a running local kubernetes cluster
update-check Print current and latest version number
update-context Verify the IP address of the running cluster in kubeconfig.
version Print the version of minikube Flags:
--alsologtostderr log to standard error as well as files
-b, --bootstrapper string The name of the cluster bootstrapper that will set up the kubernetes cluster. (default "kubeadm")
-h, --help help for minikube
--log_backtrace_at traceLocation when logging hits line file:N, emit a stack trace (default :0)
--log_dir string If non-empty, write log files in this directory
--logtostderr log to standard error instead of files
-p, --profile string The name of the minikube VM being used.
This can be modified to allow for multiple minikube instances to be run independently (default "minikube")
--stderrthreshold severity logs at or above this threshold go to stderr (default 2)
-v, --v Level log level for V logs
--vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging Use "minikube [command] --help" for more information about a command.

随后使用k8s的命令即可在本机进行测试,如

kubectl get pods

Mac安装minikube的更多相关文章

  1. Mac 安装Minikube

    环境信息: guoguo-MacBook-Pro-3:~ guoguo$ docker versionClient: Version:    17.12.0-ce API version:    1. ...

  2. mac安装tensorflow报错

    问题:mac安装tensorflow过程中,爆出oserror:permission denied 解决方案:关闭mac的sip,然后sudo安装 关闭sip的方法:重启mac,按住command+R ...

  3. Mac 安装activate-power-mode atom

    Mac 安装activate-power-mode atom 标签: atommac 2015-12-02 14:53 308人阅读 评论(0) 收藏 举报  分类: git(2)  版权声明:本文为 ...

  4. Mac安装ctags

    Mac安装ctags mac 系统有自带的ctags,但是不支持"ctags -R"指令,需要自己在安装Exuberant Ctags 1.下载ctags 2. 安装 ./conf ...

  5. ubuntu 安装 swoole 和mac 安装swoole 扩展

    ubuntu php 安装swoole 比较容易 1. 从git下载源码 2. 下载pcre http://sourceforge.net/projects/pcre/files/pcre/8.36/ ...

  6. [Scrapy] Mac安装Scrapy

    Mac安装Scrapy Mac版本 10.11 El Captain. 前一段想在Mac上用Scrapy,各种问题.有一个不错的工具:Anaconda. 安装Anaconda 下载地址 我还是下pyt ...

  7. mac 安装 nginx 环境

    1.brew search nginx 2.brew install nginx 启动nginx ,sudo nginx ;访问localhost:8080 发现已出现nginx的欢迎页面了. 备注: ...

  8. 学习mongo系列(一) win/mac安装 解析 连接

    一.安装mongo数据库 下载链接https://www.mongodb.org/downloads, 在执行如下命令的时候事先按照目录新建如下的目录:(如果数据库安装在D盘就在D盘的根目录下建)&q ...

  9. 20160512关于mac安装caffe的记录

    记得2015年在mac系统上安装过一次caffe,非常顺利,但是最近群里许多同学反映mac安装caffe出现了各种问题,同时我也在帮助别人安装caffe的时候也遇到了一些坑,不再像以前这么顺利了.估计 ...

随机推荐

  1. iOS APP提交上架流程

    转载自CocoaChina,链接地址:http://www.cocoachina.com/bbs/read.php?tid=330302 后面问题我也遇到了,参考该文章解决的 转自http://blo ...

  2. 谷歌浏览器把网页打印成pdf

    一.认识markdown mweb for mac2.2.7 激活版 二.pdf和word pdf的可移植性比较好,在不同的操作系统中都能打开,而且安全,但是可编辑性不好,所以通常用markdown编 ...

  3. angular笔记_6

    <!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8" ...

  4. Centos6.5部署Rsyslog+LogAnalyzer中文乱码解决

    中文乱码 [root@log include]# pwd /zhang/app/loganalyzer-/src/include [root@log include]# vim functions_c ...

  5. AE插入音乐

    将音乐文件(如MP3文件)直接拖拽到工程里就可以. 然后添加到合成里. 点击内容预览 ,就自动播放了. 在合成窗口里面,我们可以对于音频文件进行拖动,以及裁剪等操作,但是需要注意的是AE里面不能预览声 ...

  6. [Python] dict对象的keys()和values()返回的值,是否总是保证一一对应?

    搜dict的key, value顺序, 中文没搜到想要的结果. 英文答案链接:python-dictionary-are-keys-and-values-always-the-same-order 在 ...

  7. [HNOI2018]寻宝游戏

    Description: 给出\(n\)个长为\(m\)的01串,第0个为0,同时给出\(q\)个询问串,每次向其中添加\(n\)个\(\&\)或\(|\)符号,求使这些串按顺序运算得到询问串 ...

  8. 最优贸易 [NOIP 2009]

    Description C 国有 n 个大城市和 m 条道路,每条道路连接这 n 个城市中的某两个城市.任意两个城市之间最多只有一条道路直接相连.这 m 条道路中有一部分为单向通行的道路,一部分为双向 ...

  9. python基础介绍二

    一.python种类 1.1 Cpython python官方版本,使用c语言实现,运行机制:先编译,py(源码文件)->pyc(字节码文件),最终执行时先将字节码转换成机器码,然后交给cpu执 ...

  10. PHP05

    php05 1.音乐案例删除部分 1)通过执行某些PHP代码获取到指定的数据,填充到html的指定位置 accept属性也可以直接写扩展名,多个扩展名间用英文的逗号分隔 accept=".l ...