minikube start 可选项(中文版)

minikube start 常用可选项

输入minikube start -h > a.txt
常用如下


    --kubernetes-version='':
	The Kubernetes version that the minikube VM will use (ex: v1.2.3, 'stable' for v1.30.0, 'latest' for v1.30.0). Defaults to 'stable'.
	
    --image-mirror-country='':
	需要使用的镜像镜像的国家/地区代码。留空以使用全球代码。对于中国大陆用户,请将其设置为 cn。
	
    --image-repository='':
	用于从中拉取 docker 镜像的备选镜像存储库。如果您对 gcr.io 的访问受到限制,则可以使用该镜像存储库。将镜像存储库设置为“auto”可让 minikube 为您选择一个存储库。对于中国大陆用户,您可以使用本地 gcr.io 镜像,例如 registry.cn-hangzhou.aliyuncs.com/google_containers	

    --cpus='2':
	Number of CPUs allocated to Kubernetes. Use "max" to use the maximum number of CPUs. Use "no-limit" to not specify a limit (Docker/Podman only)

    --memory='':
	Amount of RAM to allocate to Kubernetes (format: <number>[<unit>], where unit = b, k, m or g). Use "max" to use the maximum amount of memory. Use "no-limit" to not specify a limit (Docker/Podman only)	

    --driver='':
	Driver is one of: virtualbox, kvm2, qemu2, qemu, vmware, none, docker, podman, ssh (defaults to auto-detect)

kubernetes-version版本可以通过补丁版本网站查看
image-mirror-country设置为cn

minikube start --kubernetes-version='1.28'  --registry-mirror=https://docker.mirrors.ustc.edu.cn --image-mirror-country='cn'

完整输出

启动本地 Kubernetes 集群

Options:
    --addons=[]:
	启用插件。执行 `minikube addons list` 查看可用插件名称列表

    --apiserver-ips=[]:
	一组在为 kubernetes 生成的证书中使用的 apiserver IP 地址。如果您希望将此 apiserver 设置为可从机器外部访问,则可以使用这组 apiserver IP 地址

    --apiserver-name='minikubeCA':
	用于 apiserver 证书和连接的权威 apiserver 主机名。如果您希望使 apiserver 从计算机外部可用,可以使用此选项

    --apiserver-names=[]:
	一组在为 kubernetes 生成的证书中使用的 apiserver 名称。如果您希望将此 apiserver 设置为可从机器外部访问,则可以使用这组 apiserver 名称

    --apiserver-port=8443:
	apiserver 侦听端口

    --auto-pause-interval=1m0s:
	在 minikube 虚拟机暂停之前的不活动时间(默认为1分钟)

    --auto-update-drivers=true:
	如果设置为 true,将自动更新驱动到最新版本。默认为 true。

    --base-image='gcr.io/k8s-minikube/kicbase:v0.0.44@sha256:eb04641328b06c5c4a14f4348470e1046bbcf9c2cbc551486e343d3a49db557e':
	Docker/Podman 驱动程序使用的基础映像。用于本地部署。

    --binary-mirror='':
	kubectl、kubelet、kubeadm 二进制文件源。

    --cache-images=true:
	如果设置为 true,则缓存当前引导程序的 docker 镜像并加载到机器中。当使用--driver=none时,始终为false。

    --cert-expiration=26280h0m0s:
	minikube 证书有效期,默认为三年(26280小时)。

    --cni='':
	使用 CNI 插件。可选包括:auto、bridge、calico、cilium、flannel、kindnet 或 CNI 配置清单的路径(默认值:auto)

    --container-runtime='':
	The container runtime to be used. Valid options: docker, cri-o, containerd (default: auto)

    --cpus='2':
	Number of CPUs allocated to Kubernetes. Use "max" to use the maximum number of CPUs. Use "no-limit" to not specify a limit (Docker/Podman only)

    --cri-socket='':
	需要使用的 cri 套接字路径。

    --delete-on-failure=false:
	如果设置为 true,则在启动失败时删除当前群集,然后重试。默认为 false。

    --disable-driver-mounts=false:
	停用由管理程序提供的文件系统装载

    --disable-metrics=false:
	如果设置为 true,则禁用指标报告(CPU和内存使用率),这可以提高 CPU 利用率。默认为 false。

    --disable-optimizations=false:
	如果设置为 true,则禁用为本地 Kubernetes 做设置的优化,包括将 CoreDNS 副本数从2减少到1。默认值为false。

    --disk-size='20000mb':
	分配给 minikube 虚拟机的磁盘大小(格式:<数字>[<单位>],其中单位 = b、k、m 或 g)。

    --dns-domain='cluster.local':
	Kubernetes 集群中使用的集群 dns 域名

    --dns-proxy=false:
	为 NAT DNS 请求启用代理(仅限 virtualbox 驱动程序)

    --docker-env=[]:
	传递给 Docker 守护进程的环境变量。(格式:键值对)

    --docker-opt=[]:
	指定要传递给 Docker 守护进程的任意标志。(格式:key=value)

    --download-only=false:
	如果为 true,仅会下载和缓存文件以备后用 - 不会安装或启动任何项。

    --driver='':
	Driver is one of: virtualbox, kvm2, qemu2, qemu, vmware, none, docker, podman, ssh (defaults to auto-detect)

    --dry-run=false:
	dry-run 模式。仅验证配置,不改变系统状态

    --embed-certs=false:
	如果为 true,将在 kubeconfig 中嵌入证书。

    --enable-default-cni=false:
	已弃用,改用 --cni=bridge

    --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, skip-phases, pod-network-cidr

    --extra-disks=0:
	Number of extra disks created and attached to the minikube VM (currently only implemented for hyperkit, kvm2, and qemu2 drivers)

    --feature-gates='':
	一组用于描述 alpha 版功能/实验性功能的功能限制的键值对。

    --force=false:
	强制 minikube 执行可能有风险的操作

    --force-systemd=false:
	如果设置为 true,则强制容器运行时使用 systemd 作为 cgroup 管理器。默认为false。

    -g, --gpus='':
	所有 pods 使用您的英伟达 GPUs。选项包括:[all,nvidia](仅支持Docker容器运行时的Docker驱动程序)

    --ha=false:
	Create Highly Available Multi-Control Plane Cluster with a minimum of three control-plane nodes that will also be marked for work.

    --host-dns-resolver=true:
	为 NAT DNS 请求启用主机解析器(仅限 virtualbox 驱动程序)

    --host-only-cidr='192.168.59.1/24':
	需要用于 minikube 虚拟机的 CIDR(仅限 virtualbox 驱动程序)

    --host-only-nic-type='virtio':
	网卡类型仅用于主机网络。Am79C970A, Am79C973, 82540EM, 82543GC, 82545EM 之一,或 virtio(仅限 VirtualBox 驱动程序)

    --hyperkit-vpnkit-sock='':
	用于网络连接的 VPNKit 套接字的位置。如果为空,则停用 Hyperkit VPNKitSock;如果为“auto”,则将 Docker 用于 Mac VPNKit 连接;否则使用指定的 VSock(仅限 hyperkit 驱动程序)

    --hyperkit-vsock-ports=[]:
	应在主机上公开为套接字的访客 VSock 端口列表(仅限 hyperkit 驱动程序)

    --hyperv-external-adapter='':
	如果找不到外部交换机,将在外部适配器上创建外部交换机。(仅适用于 hyperv 驱动程序)

    --hyperv-use-external-switch=false:
	是否在未显式指定虚拟开关时使用外部开关而不是默认开关。仅适用于 hyperv 驱动程序。

    --hyperv-virtual-switch='':
	hyperv 虚拟交换机名称。默认为找到的第一个 hyperv 虚拟交换机。(仅限 hyperv 驱动程序)

    --image-mirror-country='':
	需要使用的镜像镜像的国家/地区代码。留空以使用全球代码。对于中国大陆用户,请将其设置为 cn。

    --image-repository='':
	用于从中拉取 docker 镜像的备选镜像存储库。如果您对 gcr.io 的访问受到限制,则可以使用该镜像存储库。将镜像存储库设置为“auto”可让 minikube 为您选择一个存储库。对于中国大陆用户,您可以使用本地 gcr.io 镜像,例如 registry.cn-hangzhou.aliyuncs.com/google_containers

    --insecure-registry=[]:
	传递给 Docker 守护进程的不安全 Docker Registry。 系统会自动添加默认 service CIDR 范围。

    --install-addons=true:
	如果设置为 true,则安装插件。默认为true。

    --interactive=true:
	允许用户提示以获取更多信息

    --iso-url=[https://storage.googleapis.com/minikube/iso/minikube-v1.33.1-amd64.iso,https://github.com/kubernetes/minikube/releases/download/v1.33.1/minikube-v1.33.1-amd64.iso,https://kubernetes.oss-cn-hangzhou.aliyuncs.com/minikube/iso/minikube-v1.33.1-amd64.iso]:
	minikube ISO镜像源。

    --keep-context=false:
	这将保留现有 kubectl 上下文并创建 minikube 上下文。

    --kubernetes-version='':
	The Kubernetes version that the minikube VM will use (ex: v1.2.3, 'stable' for v1.30.0, 'latest' for v1.30.0). Defaults to 'stable'.

    --kvm-gpu=false:
	在 minikube 中启用实验性 NVIDIA GPU 支持

    --kvm-hidden=false:
	向 minikube 中的访客隐藏管理程序签名(仅限 kvm2 驱动程序)

    --kvm-network='default':
	KVM 默认 network 名称(仅适用于 kvm2 驱动程序)

    --kvm-numa-count=1:
	在 minikube 中模拟 numa 节点数量,支持的 numa 节点数量范围为 1-8 (仅支持 kvm2 驱动程序)

    --kvm-qemu-uri='qemu:///system':
	KVM QEMU 连接 URI。(仅限 kvm2 驱动程序)

    --listen-address='':
	用于暴露端口的IP地址(仅适用于docker和podman驱动程序)

    --memory='':
	Amount of RAM to allocate to Kubernetes (format: <number>[<unit>], where unit = b, k, m or g). Use "max" to use the maximum amount of memory. Use "no-limit" to not specify a limit (Docker/Podman only)

    --mount=false:
	这将启动装载守护进程并将文件自动装载到 minikube 中。

    --mount-9p-version='9p2000.L':
	Specify the 9p version that the mount should use

    --mount-gid='docker':
	用于挂载默认的 group id

    --mount-ip='':
	Specify the ip that the mount should be setup on

    --mount-msize=262144:
	The number of bytes to use for 9p packet payload

    --mount-options=[]:
	其他挂载选项,例如:cache=fscache

    --mount-port=0:
	Specify the port that the mount should be setup on, where 0 means any free port.

    --mount-string='/home/zzyy:/minikube-host':
	传递 minikube mount 命令的参数。

    --mount-type='9p':
	Specify the mount filesystem type (supported types: 9p)

    --mount-uid='docker':
	用于挂载默认的 user id

    --namespace='default':
	启动后要激活的命名空间

    --nat-nic-type='virtio':
	用于 nat 网络的 NIC 类型。 Am79C970A、Am79C973、82540EM、82543GC、82545EM 或 virtio 之一(仅限 virtualbox 驱动程序)

    --native-ssh=true:
	使用原生的Golang SSH客户端(默认为true)。将其设置为 'false' 以在访问 Docker 机器时使用命令行的 'ssh' 命令。对于那些不以 'Waiting for SSH' 开头的机器驱动程序来说非常有用。

    --network='':
	运行 minikube 的网络。现在它被 docker/podman 和 KVM 驱动程序使用。如果留空,minikube 将创建一个新的网络。

    --network-plugin='':
	已弃用,改用 --cni 来代替

    --nfs-share=[]:
	通过 NFS 装载与访客共享的本地文件夹(仅限 hyperkit 驱动程序)

    --nfs-shares-root='/nfsshares':
	NFS 共享的根目录位置,默认为 /nfsshares(仅限 hyperkit 驱动程序)

    --no-kubernetes=false:
	如果设置为 true,minikube虚拟机/容器将在不启动或配置Kubernetes的情况下启动。(只适用于新集群)

    --no-vtx-check=false:
	禁用在启动虚拟机之前检查硬件虚拟化的可用性(仅限 virtualbox 驱动程序)

    -n, --nodes=1:
	The total number of nodes to spin up. Defaults to 1.

    -o, --output='text':
	标准输出的格式。可选项包括:[text,json]

    --ports=[]:
	应该公开的端口列表(仅适用于 docker 和 podman 驱动)

    --preload=true:
	如果设置为true,则在可用时下载预加载映像的tarball,以提高启动时间。默认为true。

    --qemu-firmware-path='':
	qemu 固件文件的路径。默认值:对于 Linux,使用默认固件位置。对于 macOS,使用 brew 安装位置。对于 Windows,使用 C:\Program Files\qemu\share

    --registry-mirror=[]:
	传递给 Docker 守护进程的注册表镜像

    --service-cluster-ip-range='10.96.0.0/12':
	需要用于服务集群 IP 的 CIDR。

    --socket-vmnet-client-path='':
	vmnet 客户端二进制文件的路径(仅适用于 QEMU 驱动程序)

    --socket-vmnet-path='':
	vmnet 二进制文件的路径(仅适用于 QEMU 驱动程序)

    --ssh-ip-address='':
	ssh 主机IP地址(仅适用于SSH驱动程序)

    --ssh-key='':
	SSH 密钥(仅适用于SSH驱动程序)

    --ssh-port=22:
	SSH 端口(仅适用于SSH驱动程序)

    --ssh-user='root':
	SSH 用户名(仅适用于SSH驱动程序)

    --static-ip='':
	为 minikube 集群设置静态IP,该IP必须是私有IPv4地址,最后一位必须介于2和254之间,例如:192.168.200.200(仅适用于 Docker 和 Podman 驱动程序)

    --subnet='':
	在 kic 集群上使用的子网。如果留空,minikube 将从 192.168.49.0 开始选择子网地址。(仅适用于 docker 和 podman 驱动程序)

    --trace='':
	发送跟踪事件。包含的选项:[gcp]

    --uuid='':
	提供虚拟机 UUID 以恢复 MAC 地址(仅限 hyperkit 驱动程序)

    --vm=false:
	仅用于 VM 驱动程序的筛选器

    --vm-driver='':
	已弃用,请改用 `driver`。

    --wait=[apiserver,system_pods]:
	comma separated list of Kubernetes components to verify and wait for after starting a cluster. defaults to "apiserver,system_pods", available options: "apiserver,system_pods,default_sa,apps_running,node_ready,kubelet" . other acceptable values are 'all' or 'none', 'true' and 'false'

    --wait-timeout=6m0s:
	Kubernetes 或主机正常运行前的最大等待时间。

Usage:
  minikube start [flags] [options]

Use "minikube options" for a list of global command-line options (applies to all commands).

参考资料

轻量级 K8S 环境 安装minikube
使用 minikube 安装指定版本的 k8s 集群

  • 3
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值