Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Require crictl to be installed for none driver #16215

Merged
merged 1 commit into from
Apr 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions cmd/minikube/cmd/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -1844,6 +1844,12 @@ func validateBareMetal(drvName string) {
exit.Message(reason.GuestMissingConntrack, "Sorry, Kubernetes {{.k8sVersion}} requires conntrack to be installed in root's path", out.V{"k8sVersion": version.String()})
}
}
// crictl is required starting with Kubernetes 1.24, for all runtimes since the removal of dockershim
if version.GTE(semver.MustParse("1.24.0-alpha.0")) {
if _, err := exec.LookPath("crictl"); err != nil {
exit.Message(reason.GuestMissingConntrack, "Sorry, Kubernetes {{.k8sVersion}} requires crictl to be installed in root's path", out.V{"k8sVersion": version.String()})
}
}
}

func exitIfNotForced(r reason.Kind, message string, v ...out.V) {
Expand Down
2 changes: 2 additions & 0 deletions pkg/minikube/reason/reason.go
Original file line number Diff line number Diff line change
Expand Up @@ -376,6 +376,8 @@ var (
GuestDrvMismatch = Kind{ID: "GUEST_DRIVER_MISMATCH", ExitCode: ExGuestConflict, Style: style.Conflict}
// minikube could not find conntrack on the host, which is required from Kubernetes 1.18 onwards
GuestMissingConntrack = Kind{ID: "GUEST_MISSING_CONNTRACK", ExitCode: ExGuestUnsupported}
// minikube could not find crictl on the host, which is required from Kubernetes 1.24 onwards
GuestMissingCrictl = Kind{ID: "GUEST_MISSING_CRICTL", ExitCode: ExGuestUnsupported}

// minikube failed to get the host IP to use from within the VM
IfHostIP = Kind{ID: "IF_HOST_IP", ExitCode: ExLocalNetworkError}
Expand Down
1 change: 1 addition & 0 deletions translations/strings.txt
Original file line number Diff line number Diff line change
Expand Up @@ -572,6 +572,7 @@
"Skipped switching kubectl context for {{.profile_name}} because --keep-context was set.": "",
"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": "",
"Sorry, Kubernetes {{.k8sVersion}} requires conntrack to be installed in root's path": "",
"Sorry, Kubernetes {{.k8sVersion}} requires crictl to be installed in root's path": "",
"Sorry, completion support is not yet implemented for {{.name}}": "",
"Sorry, please set the --output flag to one of the following valid options: [text,json]": "",
"Sorry, the IP provided with the --listen-address flag is invalid: {{.listenAddr}}.": "",
Expand Down