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
// validateCPUCount validates the cpu count matches the minimum recommended & not exceeding the available cpu count
1032
1032
funcvalidateCPUCount(drvNamestring) {
1033
-
varcpuCountint
1034
-
ifdriver.BareMetal(drvName) {
1033
+
varavailableCPUsint
1035
1034
1036
-
// Uses the gopsutil cpu package to count the number of logical cpu cores
1037
-
ci, err:=cpu.Counts(true)
1035
+
cpuCount:=getCPUCount(drvName)
1036
+
isKIC:=driver.IsKIC(drvName)
1037
+
1038
+
ifisKIC {
1039
+
si, err:=oci.CachedDaemonInfo(drvName)
1038
1040
iferr!=nil {
1039
-
klog.Warningf("Unable to get CPU info: %v", err)
1040
-
} else {
1041
-
cpuCount=ci
1041
+
si, err=oci.DaemonInfo(drvName)
1042
+
iferr!=nil {
1043
+
exit.Message(reason.Usage, "Ensure your {{.driver_name}} is running and is healthy.", out.V{"driver_name": driver.FullName(drvName)})
1044
+
}
1042
1045
}
1046
+
availableCPUs=si.CPUs
1043
1047
} else {
1044
-
cpuCount=viper.GetInt(cpus)
1048
+
ci, err:=cpu.Counts(true)
1049
+
iferr!=nil {
1050
+
exit.Message(reason.Usage, "Unable to get CPU info: {{.err}}", out.V{"err": err})
1051
+
}
1052
+
availableCPUs=ci
1045
1053
}
1046
1054
1047
1055
ifcpuCount<minimumCPUS {
1048
1056
exitIfNotForced(reason.RsrcInsufficientCores, "Requested cpu count {{.requested_cpus}} is less than the minimum allowed of {{.minimum_cpus}}", out.V{"requested_cpus": cpuCount, "minimum_cpus": minimumCPUS})
1049
1057
}
1050
1058
1051
-
if!driver.IsKIC((drvName)) {
1052
-
return
1053
-
}
1054
-
1055
-
si, err:=oci.CachedDaemonInfo(drvName)
1056
-
iferr!=nil {
1057
-
out.Styled(style.Confused, "Failed to verify '{{.driver_name}} info' will try again ...", out.V{"driver_name": drvName})
1058
-
si, err=oci.DaemonInfo(drvName)
1059
-
iferr!=nil {
1060
-
exit.Message(reason.Usage, "Ensure your {{.driver_name}} is running and is healthy.", out.V{"driver_name": driver.FullName(drvName)})
1061
-
}
1062
-
1063
-
}
1064
-
1065
-
ifsi.CPUs<cpuCount {
1066
-
1059
+
ifavailableCPUs<cpuCount {
1067
1060
ifdriver.IsDockerDesktop(drvName) {
1068
1061
out.Styled(style.Empty, `- Ensure your {{.driver_name}} daemon has access to enough CPU/memory resources.`, out.V{"driver_name": drvName})
exitIfNotForced(reason.RsrcInsufficientCores, "Requested cpu count {{.requested_cpus}} is greater than the available cpus of {{.avail_cpus}}", out.V{"requested_cpus": cpuCount, "avail_cpus": si.CPUs})
1071
+
exitIfNotForced(reason.RsrcInsufficientCores, "Requested cpu count {{.requested_cpus}} is greater than the available cpus of {{.avail_cpus}}", out.V{"requested_cpus": cpuCount, "avail_cpus": availableCPUs})
startCmd.Flags().Bool(interactive, true, "Allow user prompts for more information")
136
138
startCmd.Flags().Bool(dryRun, false, "dry-run mode. Validates configuration, but does not mutate system state")
137
139
138
-
startCmd.Flags().Int(cpus, 2, "Number of CPUs allocated to Kubernetes.")
139
-
startCmd.Flags().String(memory, "", "Amount of RAM to allocate to Kubernetes (format: <number>[<unit>], where unit = b, k, m or g).")
140
+
startCmd.Flags().String(cpus, "2", fmt.Sprintf("Number of CPUs allocated to Kubernetes. Use %q to use the maximum number of CPUs.", constants.MaxResources))
141
+
startCmd.Flags().String(memory, "", fmt.Sprintf("Amount of RAM to allocate to Kubernetes (format: <number>[<unit>], where unit = b, k, m or g). Use %q to use the maximum amount of memory.", constants.MaxResources))
140
142
startCmd.Flags().String(humanReadableDiskSize, defaultDiskSize, "Disk size allocated to the minikube VM (format: <number>[<unit>], where unit = b, k, m or g).")
141
143
startCmd.Flags().Bool(downloadOnly, false, "If true, only download and cache files for later use - don't install or start anything.")
142
144
startCmd.Flags().Bool(cacheImages, true, "If true, cache docker images for the current bootstrapper and load them into the machine. Always false with --driver=none.")
@@ -290,6 +292,30 @@ func generateClusterConfig(cmd *cobra.Command, existing *config.ClusterConfig, k
exit.Message(reason.Usage, "{{.driver_name}} has only {{.container_limit}}MB memory but you specified {{.specified_memory}}MB", out.V{"container_limit": containerLimit, "specified_memory": mem, "driver_name": driver.FullName(drvName)})
Copy file name to clipboardexpand all lines: site/content/en/docs/commands/start.md
+2-2
Original file line number
Diff line number
Diff line change
@@ -30,7 +30,7 @@ minikube start [flags]
30
30
--cache-images If true, cache docker images for the current bootstrapper and load them into the machine. Always false with --driver=none. (default true)
31
31
--cni string CNI plug-in to use. Valid options: auto, bridge, calico, cilium, flannel, kindnet, or path to a CNI manifest (default: auto)
32
32
--container-runtime string The container runtime to be used (docker, cri-o, containerd). (default "docker")
33
-
--cpus intNumber of CPUs allocated to Kubernetes. (default 2)
33
+
--cpus string Number of CPUs allocated to Kubernetes. Use "max" to use the maximum number of CPUs. (default "2")
34
34
--cri-socket string The cri socket path to be used.
35
35
--delete-on-failure If set, delete the current cluster if start fails and try again. Defaults to false.
36
36
--disable-driver-mounts Disables the filesystem mounts provided by the hypervisors
@@ -73,7 +73,7 @@ minikube start [flags]
73
73
--kvm-numa-count int Simulate numa node count in minikube, supported numa node count range is 1-8 (kvm2 driver only) (default 1)
--listen-address string IP Address to use to expose ports (docker and podman driver only)
76
-
--memory string Amount of RAM to allocate to Kubernetes (format: <number>[<unit>], where unit = b, k, m or g).
76
+
--memory string 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.
77
77
--mount This will start the mount daemon and automatically mount files into minikube.
78
78
--mount-string string The argument to pass the minikube mount command on start.
79
79
--namespace string The named space to activate after start (default "default")
Copy file name to clipboardexpand all lines: translations/de.json
+2-4
Original file line number
Diff line number
Diff line change
@@ -51,7 +51,6 @@
51
51
"Allow user prompts for more information": "",
52
52
"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": "Alternatives Bild-Repository zum Abrufen von Docker-Images. Dies ist hilfreich, wenn Sie nur eingeschränkten Zugriff auf gcr.io haben. Stellen Sie \\\"auto\\\" ein, dann wählt minikube eins für sie aus. Nutzer vom chinesischen Festland können einen lokalen gcr.io-Mirror wie registry.cn-hangzhou.aliyuncs.com/google_containers verwenden.",
53
53
"Amount of RAM allocated to the minikube VM (format: \u003cnumber\u003e[\u003cunit\u003e], where unit = b, k, m or g)": "Größe des der minikube-VM zugewiesenen Arbeitsspeichers (Format: \u003cNummer\u003e [\u003cEinheit\u003e], wobei Einheit = b, k, m oder g)",
54
-
"Amount of RAM to allocate to Kubernetes (format: \u003cnumber\u003e[\u003cunit\u003e], where unit = b, k, m or g).": "",
55
54
"Amount of time to wait for a service in seconds": "",
56
55
"Amount of time to wait for service in seconds": "",
57
56
"Another hypervisor, such as VirtualBox, is conflicting with KVM. Please stop the other hypervisor, or use --driver to switch to it.": "",
@@ -260,7 +259,6 @@
260
259
"Failed to stop node {{.name}}": "",
261
260
"Failed to update cluster": "",
262
261
"Failed to update config": "",
263
-
"Failed to verify '{{.driver_name}} info' will try again ...": "",
264
262
"Failed unmount: {{.error}}": "",
265
263
"File permissions used for the mount": "",
266
264
"Filter to use only VM Drivers": "",
@@ -395,7 +393,6 @@
395
393
"None of the known repositories is accessible. Consider specifying an alternative image repository with --image-repository flag": "Keines der bekannten Repositories ist zugänglich. Erwägen Sie, ein alternatives Image-Repository mit der Kennzeichnung --image-repository anzugeben",
396
394
"Noticed you have an activated docker-env on {{.driver_name}} driver in this terminal:": "",
397
395
"Noticed you have an activated podman-env on {{.driver_name}} driver in this terminal:": "",
398
-
"Number of CPUs allocated to Kubernetes.": "",
399
396
"Number of CPUs allocated to the minikube VM": "Anzahl der CPUs, die der minikube-VM zugeordnet sind",
400
397
"Number of lines back to go within the log": "",
401
398
"OS release is {{.pretty_name}}": "",
@@ -700,6 +697,7 @@
700
697
"Unable to find control plane": "",
701
698
"Unable to generate docs": "",
702
699
"Unable to generate the documentation. Please ensure that the path specified is a directory, exists \u0026 you have permission to write to it.": "",
700
+
"Unable to get CPU info: {{.err}}": "",
703
701
"Unable to get bootstrapper: {{.error}}": "Bootstrapper kann nicht abgerufen werden: {{.error}}",
704
702
"Unable to get command runner": "",
705
703
"Unable to get control plane status: {{.error}}": "",
@@ -943,4 +941,4 @@
943
941
"{{.profile}} profile is not valid: {{.err}}": "",
944
942
"{{.type}} is not yet a supported filesystem. We will try anyways!": "",
Copy file name to clipboardexpand all lines: translations/es.json
+2-4
Original file line number
Diff line number
Diff line change
@@ -52,7 +52,6 @@
52
52
"Allow user prompts for more information": "Permitir que el usuario solicite más información",
53
53
"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": "Repositorio de imágenes alternativo del que extraer imágenes de Docker. Puedes usarlo cuando tengas acceso limitado a gcr.io. Si quieres que minikube elija uno por ti, solo tienes que definir el valor como \"auto\". Los usuarios de China continental pueden utilizar réplicas locales de gcr.io, como registry.cn-hangzhou.aliyuncs.com/google_containers",
54
54
"Amount of RAM allocated to the minikube VM (format: \u003cnumber\u003e[\u003cunit\u003e], where unit = b, k, m or g)": "Cantidad de RAM asignada a la VM de minikube (formato: \u003cnúmero\u003e[\u003cunidad\u003e], donde unidad = b, k, m o g)",
55
-
"Amount of RAM to allocate to Kubernetes (format: \u003cnumber\u003e[\u003cunit\u003e], where unit = b, k, m or g).": "",
56
55
"Amount of time to wait for a service in seconds": "Cantidad de tiempo para esperar por un servicio en segundos",
57
56
"Amount of time to wait for service in seconds": "Cantidad de tiempo para esperar un servicio en segundos",
58
57
"Another hypervisor, such as VirtualBox, is conflicting with KVM. Please stop the other hypervisor, or use --driver to switch to it.": "Otro hipervisor, por ejemplo VirtualBox, está en conflicto con KVM. Por favor detén el otro hipervisor, o usa --driver para cambiarlo.",
@@ -265,7 +264,6 @@
265
264
"Failed to stop node {{.name}}": "",
266
265
"Failed to update cluster": "",
267
266
"Failed to update config": "",
268
-
"Failed to verify '{{.driver_name}} info' will try again ...": "",
269
267
"Failed unmount: {{.error}}": "",
270
268
"File permissions used for the mount": "",
271
269
"Filter to use only VM Drivers": "",
@@ -400,7 +398,6 @@
400
398
"None of the known repositories is accessible. Consider specifying an alternative image repository with --image-repository flag": "No se puede acceder a ninguno de los repositorios conocidos. Plantéate indicar un repositorio de imágenes alternativo con la marca --image-repository.",
401
399
"Noticed you have an activated docker-env on {{.driver_name}} driver in this terminal:": "",
402
400
"Noticed you have an activated podman-env on {{.driver_name}} driver in this terminal:": "",
403
-
"Number of CPUs allocated to Kubernetes.": "",
404
401
"Number of CPUs allocated to the minikube VM": "Número de CPU asignadas a la VM de minikube",
405
402
"Number of lines back to go within the log": "",
406
403
"OS release is {{.pretty_name}}": "",
@@ -705,6 +702,7 @@
705
702
"Unable to find control plane": "",
706
703
"Unable to generate docs": "",
707
704
"Unable to generate the documentation. Please ensure that the path specified is a directory, exists \u0026 you have permission to write to it.": "",
705
+
"Unable to get CPU info: {{.err}}": "",
708
706
"Unable to get bootstrapper: {{.error}}": "No se ha podido obtener el programa previo: {{.error}}",
709
707
"Unable to get command runner": "",
710
708
"Unable to get control plane status: {{.error}}": "",
@@ -947,4 +945,4 @@
947
945
"{{.profile}} profile is not valid: {{.err}}": "",
948
946
"{{.type}} is not yet a supported filesystem. We will try anyways!": "",
0 commit comments