目前使用k8s 要么用的物理机搭建的环境,要么就是使用docker for mac 中kubernetes 的特性,为了本地调试方便,使用下minikube

minukube 包含的特性

  • 负载均衡器
  • 多集群
  • nodeports 支持
  • 持久化数据卷
  • ingress
  • dashboard
  • 执行容器运行时
  • 配置apiserver 以及kubelet选项
  • addons 支持
  • nvidia GPU 支持
  • 文件系统挂载

下载安装包

直接可以在github 下载

配置环境变量

配置到path 路径即可

启动

minukube 实际上是kubeadm 安装的,同时minikube 在启动的时候我们可以配置比较多的参数,比如执行镜像源,配置docker 加速
配置主机内存的大小

  • 启动命令
 
minikube start --help

帮助内容

Starts a local kubernetes cluster
Options:
      --apiserver-ips=[]: A set of apiserver IP Addresses which are used in the generated
certificate for kubernetes. This can be used if you want to make the apiserver available from
outside the machine
      --apiserver-name='minikubeCA': The apiserver name which is used in the generated certificate
for kubernetes. This can be used if you want to make the apiserver available from outside the
machine
      --apiserver-names=[]: A set of apiserver names which are used in the generated certificate for
kubernetes. This can be used if you want to make the apiserver available from outside the machine
      --apiserver-port=8443: The apiserver listening port
      --cache-images=true: If true, cache docker images for the current bootstrapper and load them
into the machine. Always false with --vm-driver=none.
      --container-runtime='docker': The container runtime to be used (docker, crio, containerd)
      --cpus=2: Number of CPUs allocated to the minikube VM
      --cri-socket='': The cri socket path to be used
      --disable-driver-mounts=false: Disables the filesystem mounts provided by the hypervisors
      --disk-size='20000mb': Disk size allocated to the minikube VM (format: <number>[<unit>], where
unit = b, k, m or g)
      --dns-domain='cluster.local': The cluster dns domain name used in the kubernetes cluster
      --dns-proxy=false: Enable proxy for NAT DNS requests (virtualbox)
      --docker-env=[]: Environment variables to pass to the Docker daemon. (format: key=value)
      --docker-opt=[]: Specify arbitrary flags to pass to the Docker daemon. (format: key=value)
      --download-only=false: If true, only download and cache files for later use - don't install or
start anything.
      --enable-default-cni=false: Enable the default CNI plugin (/etc/cni/net.d/k8s.conf). Used in
conjunction with "--network-plugin=cni"
      --extra-config=: A set of key=value pairs that describe configuration that may be passed to
different components.
  The key should be '.' separated, and the first part before the dot is the component to apply the
configuration to.
  Valid components are: kubelet, kubeadm, apiserver, controller-manager, etcd, proxy, scheduler
  Valid kubeadm parameters: ignore-preflight-errors, dry-run, kubeconfig, kubeconfig-dir, node-name,
cri-socket, experimental-upload-certs, certificate-key, rootfs, pod-network-cidr
      --feature-gates='': A set of key=value pairs that describe feature gates for
alpha/experimental features.
      --host-dns-resolver=true: Enable host resolver for NAT DNS requests (virtualbox)
      --host-only-cidr='192.168.99.1/24': The CIDR to be used for the minikube VM (only supported
with Virtualbox driver)
      --hyperkit-vpnkit-sock='': Location of the VPNKit socket used for networking. If empty,
disables Hyperkit VPNKitSock, if 'auto' uses Docker for Mac VPNKit connection, otherwise uses the
specified VSock.
      --hyperkit-vsock-ports=[]: List of guest VSock ports that should be exposed as sockets on the
host (Only supported on with hyperkit now).
      --hyperv-virtual-switch='': The hyperv virtual switch name. Defaults to first found. (only
supported with HyperV driver)
      --image-mirror-country='': Country code of the image mirror to be used. Leave empty to use the
global one. For Chinese mainland users, set it to cn
      --image-repository='': Alternative image repository to pull docker images from. This can be
used when you have limited access to gcr.io. Set it to "auto" to let minikube decide one for you.
For Chinese mainland users, you may use local gcr.io mirrors such as
registry.cn-hangzhou.aliyuncs.com/google_containers
      --insecure-registry=[]: Insecure Docker registries to pass to the Docker daemon. The default
service CIDR range will automatically be added.
      --iso-url='https://storage.googleapis.com/minikube/iso/minikube-v1.3.0.iso': Location of the
minikube iso
      --keep-context=false: This will keep the existing kubectl context and will create a minikube
context.
      --kubernetes-version='v1.15.2': The kubernetes version that the minikube VM will use (ex:
v1.2.3)
      --kvm-gpu=false: Enable experimental NVIDIA GPU support in minikube
      --kvm-hidden=false: Hide the hypervisor signature from the guest in minikube
      --kvm-network='default': The KVM network name. (only supported with KVM driver)
      --kvm-qemu-uri='qemu:///system': The KVM QEMU connection URI. (works only with kvm2 driver on
linux)
      --memory='2000mb': Amount of RAM allocated to the minikube VM (format: <number>[<unit>], where
unit = b, k, m or g)
      --mount=false: This will start the mount daemon and automatically mount files into minikube
      --mount-string='/Users:/minikube-host': The argument to pass the minikube mount command on
start
      --network-plugin='': The name of the network plugin
      --nfs-share=[]: Local folders to share with Guest via NFS mounts (Only supported on with
hyperkit now)
      --nfs-shares-root='/nfsshares': Where to root the NFS Shares (defaults to /nfsshares, only
supported with hyperkit now)
      --no-vtx-check=false: Disable checking for the availability of hardware virtualization before
the vm is started (virtualbox)
      --registry-mirror=[]: Registry mirrors to pass to the Docker daemon
      --service-cluster-ip-range='10.96.0.0/12': The CIDR to be used for service cluster IPs.
      --uuid='': Provide VM UUID to restore MAC address (only supported with Hyperkit driver).
      --vm-driver='virtualbox': VM driver is one of: [virtualbox parallels vmwarefusion hyperkit
vmware]
      --wait=true: Wait until Kubernetes core services are healthy before exiting
Usage:
  minikube start [flags] [options]
  • 启动
    从上边的帮助上我们可以看出还是比较全的参数控制,启动也比较简单
minikube start --image-mirror-country=cn --registry-mirror=https://b3uey254.mirror.aliyuncs.com

效果

												

minikube 安装试用的更多相关文章

  1. 项目管理工具 Redmine 安装试用手记

    原文:项目管理工具 Redmine 安装试用手记 项目管理工具 Redmine 安装试用手记 分类: Redmine2009-06-01 10:12 996人阅读 评论(1) 收藏 举报 项目管理工具 ...

  2. Minikube 安装

    安装Minikube 在容器编排工具中安装配置最复杂的就是Kubernetes,想要运行一个简单的容器集群环境,对于没有使用过Kubernetes的人来说,需要花费一定的时间去理解各组件的概念和功能, ...

  3. Tencent Server Web 安装试用

    Tencent Server Web 安装试用 私有环境搭建,使用docker-compose 进行memcache 安装 参考github 代码 https://github.com/rongfen ...

  4. toxiproxy 安装试用

    备注:    实际上是一个代理工具,但是又不是简单的进行代理(tcp,可以配置策略,toxics 实现延迟,模拟故障,    对于这个大家可能了解的就是netflix 公司的chaos monkey, ...

  5. 使用 Minikube 安装 Kubernetes

    概述: 单机低配置主机也可以玩转kubernetes集群.该文章是将介绍使用Minikube安装Kubernetes集群(一般用于本地/开发环境). 配置环境: 硬件:CPU 至少2个核心,至少2.5 ...

  6. windows openssh server 安装试用

    使用Windows的可能会知道win10 的已经包好了openssh 服务,但是对于其他机器win 7 windows 2008 ,就需要其他的方法了 还好powershell 团队开发了支持wind ...

  7. pgbench 安装试用

    pgbench 是一个方便的pg 性能测试工具,以下是简单的测试试用 安装 安装pg yum install https://download.postgresql.org/pub/repos/yum ...

  8. flynn 开源paas 平台安装试用

    flynn 是一个不错的开源paas 平台,基于git 以及容器技术,开发模型与 heroku 基本一样,同时构建方式就是基于heroku 的buildpacks 安装 官方文档提示说明是ubuntu ...

  9. nsq 安装试用

    因为是mac 系统安装试用brew install nsq 安装 brew install nsq 组件说明 nsqd 守护进程进行消息的接受,缓存以及传递消息给客户端,需要配置nsqlookupd地 ...

随机推荐

  1. 『正睿OI 2019SC Day4』

    总结 今天是一场欢乐的\(ACM\)比赛,于是我队得到了全场倒数的好排名. 好吧,其实还是怪自己不能怪队友啦.对于\(ACM\),可能最主要的还是经验不足,导致比赛的时候有点紧张.虽然队友为了磕一道题 ...

  2. Docker 安装 Redis, 搭建 Redis 环境

    欢迎关注个人微信公众号: 小哈学Java, 文末分享阿里 P8 资深架构师吐血总结的 <Java 核心知识整理&面试.pdf>资源链接!! 个人网站: https://www.ex ...

  3. 比较器Comparable和Comparator

    在java中要实现自定义类的比较,提供了以下两个接口: Comparable(内部排序) int compareTo(Object obj);返回值为int,默认升序排序 Comparator(外部排 ...

  4. 经实验验证,修正对using namespace std的认识

    备注①:name:符号.指的实体包括:变量.函数.类 备注②:认为全局命名空间也是一个包,在此称作 ROOT:: 或 global:: (这样就有了两个特别的包:一个是全局包,一个是std包.但对于编 ...

  5. POI SXSSF API 导出1000万数据示例

    SXSSF是XSSF API的兼容流式扩展,在必须生成非常大的电子表格.并且堆空间有限时使用. SXSSF通过限制对滑动窗口内数据的访问实现低内存占用,而XSSF允许访问文档中的所有行. 不在窗口中的 ...

  6. drf序列化与反序列化

    序列化器-Serializer 定义序列化器 Django REST framework中的Serializer使用类来定义,须继承自rest_framework.serializers.Serial ...

  7. java接口中的成员方法和成员变量

    接口的含义理解:接口可以理解成统一的"协议",而接口中的属性也属于协议中的内容;但是接口的属性都是公共的,静态的,最终的 接口的成员特点:A:成员变量 只能是常量.默认修饰符 pu ...

  8. Maven国内源设置 - OSChina国内源失效了,别更新了

    Maven国内源设置 - OSChina国内源失效了,别更新了 原文:http://blog.csdn.net/chwshuang/article/details/52198932 最近在写一个Spr ...

  9. BBC评出的100本最具影响力经典书籍

    今年,英国广播公司(BBC)邀请全球35个国家共108名文化人士,参与其发起的“影响思维和历史的100部虚构故事”的推荐,要求每人最多提名 5 部作品,这些作品最终将根据提名总量排名. 该活动经过一个 ...

  10. Httpd服务进阶知识-基于Apache Modele的LAMP架构之WordPress案例

    Httpd服务进阶知识-基于Apache Modele的LAMP架构之WordPress案例 作者:尹正杰 版权声明:原创作品,谢绝转载!否则将追究法律责任. 一.安装依赖包及数据库授权 博主推荐阅读 ...