You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: cmd/minikube/cmd/start_flags.go
+129-2Lines changed: 129 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -18,6 +18,7 @@ package cmd
18
18
19
19
import (
20
20
"fmt"
21
+
"net"
21
22
"runtime"
22
23
"strings"
23
24
"time"
@@ -61,6 +62,7 @@ const (
61
62
kubernetesVersion="kubernetes-version"
62
63
noKubernetes="no-kubernetes"
63
64
hostOnlyCIDR="host-only-cidr"
65
+
hostOnlyCIDRv6="host-only-cidr-v6"
64
66
containerRuntime="container-runtime"
65
67
criSocket="cri-socket"
66
68
networkPlugin="network-plugin"// deprecated, use --cni instead
@@ -84,6 +86,8 @@ const (
84
86
apiServerPort="apiserver-port"
85
87
dnsDomain="dns-domain"
86
88
serviceCIDR="service-cluster-ip-range"
89
+
serviceCIDRv6="service-cluster-ip-range-v6"
90
+
ipFamily="ip-family"
87
91
imageRepository="image-repository"
88
92
imageMirrorCountry="image-mirror-country"
89
93
mountString="mount-string"
@@ -144,8 +148,12 @@ const (
144
148
socketVMnetClientPath="socket-vmnet-client-path"
145
149
socketVMnetPath="socket-vmnet-path"
146
150
staticIP="static-ip"
151
+
staticIPv6="static-ipv6"
147
152
gpus="gpus"
148
153
autoPauseInterval="auto-pause-interval"
154
+
subnetv6="subnet-v6"
155
+
podCIDR="pod-cidr"
156
+
podCIDRv6="pod-cidr-v6"
149
157
)
150
158
151
159
var (
@@ -209,6 +217,7 @@ func initMinikubeFlags() {
209
217
startCmd.Flags().Bool(disableMetrics, false, "If set, disables metrics reporting (CPU and memory usage), this can improve CPU usage. Defaults to false.")
startCmd.Flags().String(staticIP, "", "Set a static IP for the minikube cluster, the IP must be: private, IPv4, and the last octet must be between 2 and 254, for example 192.168.200.200 (Docker and Podman drivers only)")
220
+
startCmd.Flags().String(staticIPv6, "", "Set a static IPv6 address for the minikube cluster, for example fd00::100 (Docker and Podman drivers only)")
212
221
startCmd.Flags().StringP(gpus, "g", "", "Allow pods to use your GPUs. Options include: [all,nvidia,amd] (Docker driver with Docker container-runtime only)")
213
222
startCmd.Flags().Duration(autoPauseInterval, time.Minute*1, "Duration of inactivity before the minikube VM is paused (default 1m0s)")
214
223
}
@@ -260,6 +269,7 @@ func initDriverFlags() {
260
269
261
270
// virtualbox
262
271
startCmd.Flags().String(hostOnlyCIDR, "192.168.59.1/24", "The CIDR to be used for the minikube VM (virtualbox driver only)")
272
+
startCmd.Flags().String(hostOnlyCIDRv6, "fd00::1/64", "The IPv6 CIDR to be used for the minikube VM (virtualbox driver only)")
263
273
startCmd.Flags().Bool(dnsProxy, false, "Enable proxy for NAT DNS requests (virtualbox driver only)")
264
274
startCmd.Flags().Bool(hostDNSResolver, true, "Enable host resolver for NAT DNS requests (virtualbox driver only)")
265
275
startCmd.Flags().Bool(noVTXCheck, false, "Disable checking for the availability of hardware virtualization before the vm is started (virtualbox driver only)")
@@ -282,6 +292,9 @@ func initDriverFlags() {
282
292
startCmd.Flags().String(listenAddress, "", "IP Address to use to expose ports (docker and podman driver only)")
283
293
startCmd.Flags().StringSlice(ports, []string{}, "List of ports that should be exposed (docker and podman driver only)")
284
294
startCmd.Flags().String(subnet, "", "Subnet to be used on kic cluster. If left empty, minikube will choose subnet address, beginning from 192.168.49.0. (docker and podman driver only)")
295
+
startCmd.Flags().String(subnetv6, "", "IPv6 subnet (CIDR) for the Docker/Podman network. If empty, minikube picks an internal ULA. (docker and podman driver only)")
296
+
startCmd.Flags().String(podCIDR, "", "IPv4 CIDR to use for pod IPs (bridge CNI).")
297
+
startCmd.Flags().String(podCIDRv6, "", "IPv6 CIDR to use for pod IPs (bridge CNI).")
285
298
286
299
// qemu
287
300
startCmd.Flags().String(qemuFirmwarePath, "", "Path to the qemu firmware file. Defaults: For Linux, the default firmware location. For macOS, the brew installation location. For Windows, C:\\Program Files\\qemu\\share")
@@ -293,7 +306,9 @@ func initNetworkingFlags() {
293
306
startCmd.Flags().StringSliceVar(®istryMirror, "registry-mirror", nil, "Registry mirrors to pass to the Docker daemon")
294
307
startCmd.Flags().String(imageRepository, "", "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")
295
308
startCmd.Flags().String(imageMirrorCountry, "", "Country code of the image mirror to be used. Leave empty to use the global one. For Chinese mainland users, set it to cn.")
296
-
startCmd.Flags().String(serviceCIDR, constants.DefaultServiceCIDR, "The CIDR to be used for service cluster IPs.")
309
+
startCmd.Flags().String(serviceCIDR, constants.DefaultServiceCIDR, "The IPv4 CIDR to be used for service cluster IPs.")
310
+
startCmd.Flags().String(serviceCIDRv6, constants.DefaultServiceCIDRv6, "The IPv6 CIDR to be used for service cluster IPs.")
311
+
startCmd.Flags().String(ipFamily, "ipv4", "Cluster IP family mode: one of 'ipv4' (default), 'ipv6', or 'dual'.")
297
312
startCmd.Flags().StringArrayVar(&config.DockerEnv, "docker-env", nil, "Environment variables to pass to the Docker daemon. (format: key=value)")
298
313
startCmd.Flags().StringArrayVar(&config.DockerOpt, "docker-opt", nil, "Specify arbitrary flags to pass to the Docker daemon. (format: key=value)")
0 commit comments