Skip to content

Commit 7e8444a

Browse files
authored
Merge pull request #16215 from afbjorklund/none-crictl
Require crictl to be installed for none driver
2 parents eed7dea + ae7b5dc commit 7e8444a

File tree

3 files changed

+9
-0
lines changed

3 files changed

+9
-0
lines changed

cmd/minikube/cmd/start.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1844,6 +1844,12 @@ func validateBareMetal(drvName string) {
18441844
exit.Message(reason.GuestMissingConntrack, "Sorry, Kubernetes {{.k8sVersion}} requires conntrack to be installed in root's path", out.V{"k8sVersion": version.String()})
18451845
}
18461846
}
1847+
// crictl is required starting with Kubernetes 1.24, for all runtimes since the removal of dockershim
1848+
if version.GTE(semver.MustParse("1.24.0-alpha.0")) {
1849+
if _, err := exec.LookPath("crictl"); err != nil {
1850+
exit.Message(reason.GuestMissingConntrack, "Sorry, Kubernetes {{.k8sVersion}} requires crictl to be installed in root's path", out.V{"k8sVersion": version.String()})
1851+
}
1852+
}
18471853
}
18481854

18491855
func exitIfNotForced(r reason.Kind, message string, v ...out.V) {

pkg/minikube/reason/reason.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -376,6 +376,8 @@ var (
376376
GuestDrvMismatch = Kind{ID: "GUEST_DRIVER_MISMATCH", ExitCode: ExGuestConflict, Style: style.Conflict}
377377
// minikube could not find conntrack on the host, which is required from Kubernetes 1.18 onwards
378378
GuestMissingConntrack = Kind{ID: "GUEST_MISSING_CONNTRACK", ExitCode: ExGuestUnsupported}
379+
// minikube could not find crictl on the host, which is required from Kubernetes 1.24 onwards
380+
GuestMissingCrictl = Kind{ID: "GUEST_MISSING_CRICTL", ExitCode: ExGuestUnsupported}
379381

380382
// minikube failed to get the host IP to use from within the VM
381383
IfHostIP = Kind{ID: "IF_HOST_IP", ExitCode: ExLocalNetworkError}

translations/strings.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -572,6 +572,7 @@
572572
"Skipped switching kubectl context for {{.profile_name}} because --keep-context was set.": "",
573573
"Some dashboard features require the metrics-server addon. To enable all features please run:\n\n\tminikube{{.profileArg}} addons enable metrics-server\t\n\n": "",
574574
"Sorry, Kubernetes {{.k8sVersion}} requires conntrack to be installed in root's path": "",
575+
"Sorry, Kubernetes {{.k8sVersion}} requires crictl to be installed in root's path": "",
575576
"Sorry, completion support is not yet implemented for {{.name}}": "",
576577
"Sorry, please set the --output flag to one of the following valid options: [text,json]": "",
577578
"Sorry, the IP provided with the --listen-address flag is invalid: {{.listenAddr}}.": "",

0 commit comments

Comments
 (0)