安装过程

先安装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. EF Core中的多对多映射如何实现?

    EF 6.X中的多对多映射是直接使用HasMany-HasMany来做的.但是到了EF Core中,不再直接支持这种方式了,可以是可以使用,但是不推荐,具体使用可以参考<你必须掌握的Entity ...

  2. jmeter正则表达式提取器提取特定字符串后的全部内容

    jmeter进行JDBC请求时,请求后的响应结果在传递给下一个请求使用时,需要用到关联,也在jmeter中,关联通过正则表达式提取器实现. 但是,在JDBC请求后的响应结果中,往往需要关联的内容是只有 ...

  3. TCP粘包问题

    1.什么是粘包? 粘包指的是数据与数据之间没有明确的分界线,导致不能正确的读取数据.换句话说就是接收方不知道发送方一次到底发送了多少数据.只有TCP才会出现粘包现象,UDP不会出现粘包现象,因为TCP ...

  4. sql语句(一)— —判断是否有这条数据的优化

    今天发现一个业务上的存储过程写的不够完善,和老板反应后,老板说你来完善吧,我:苦瓜脸~.说实话,我对SQL语句的熟练程度真的是不提也罢[捂脸],大概的判断流程我知道,但是真的让我自己写,还真得上网查查 ...

  5. BZOJ.4513.[SDOI2016]储能表(数位DP)

    BZOJ 洛谷 切了一道简单的数位DP,终于有些没白做题的感觉了...(然而mjt更强没做过这类的题也切了orz) 看部分分,如果\(k=0\),就是求\(\sum_{i=0}^n\sum_{j=0} ...

  6. django rest_framework 序列化组件详解

    为什么要用序列化组件 当我们做前后端分离的项目,我们前后端交互一般都选择JSON数据格式,JSON是一个轻量级的数据交互格式. 那么我们给前端数据的时候都要转成json格式,那就需要对我们从数据库拿到 ...

  7. 【开源GPS追踪】 之 服务器端opengts安装

    国内大多数GPS追踪/定位 平台都是基于opengts 二次开发的,opengts 是一款开源的gps 跟踪软件. 下面摘自百度百科: OpenGTS ™(“GPS跟踪系统”)是第一个可用的开源项目, ...

  8. 潭州课堂25班:Ph201805201 django框架 第四课 模板常用标签,模板继承与引用,自定义过渡器 (课堂笔记)

    if 语句 判断传入的 name 值 建好这些文件后,对 url 进行配置 在浏览器中访问 for 循环 页面跳转: 通过  name 跳转时要在 urls 文件中为该 path 设置 name 带参 ...

  9. BZOJ4738 : 汽水

    二分答案$mid$,若存在一条路径满足$|ave-k|<mid$,则答案至多为$mid-1$. 若$ave\leq k$,则$\sum(w-k)\leq 0$,且$\sum(k-w-mid)&l ...

  10. Linux硬盘管理

    管理好硬盘/dev/xxynsd SCSI SATA USBhd IDE主分区扩展分区 1-4逻辑分区5以后fdisk -l 硬盘名/分区名fdisk -l /dev/sda 如何给硬盘分区?把500 ...