-
Notifications
You must be signed in to change notification settings - Fork 717
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
Auto detect CRI #1117
Comments
/assign |
+1 |
How automatic detection of CRI runtime will help to solve this? If we have docker and CRI runtimes running and kubeadm detects CRI runtime it still has to decide which one to use. Currently --cri-socket is an explicit way to point out that user wants to use CRI runtime. If we remove this we'll have to set clear priorities and let the user know about them somehow. Otherwise it would create more confusion then current approach. |
@bart0sh I think of a more simple approach on that. Something along the lines of:
The idea is not to cover all cases, but only the major case, where only one CRI is installed and that's not Docker. |
@rosti thanks for the explanations. That makes sense to do, agree. In case more than one runtime is detected kubeadm can either bail out or simply ask user which one to use. |
@rosti Another suggestion is to avoid using crictl when detecting CRI. Using CRI API call[s] would be better in my opinion. It will keep kubeadm independent of crictl when using default (Docker) runtime. |
@rosti I'd be happy to implement this. Just assign me to this issue if you want me to do it. |
@bart0sh I have done some work on it and I'll soon be ready to PR it (just needs tests written). It's on the above points and simply checks for the existence of several well known domain sockets. It doesn't check the |
@rosti sure. one note here. You should probably consider checking if CRI API is accessible through the socket. Checking file existence is not enough from my point of view. |
As the main PR is now merged, I think, that we should document this somewhere. Most importantly, we should document the sockets and CRIs we are able to detect as of 1.14. @neolit123 et al, I think, that these are the possible places for that purpose:
Possibly some place else? |
this seems like a good place to mention the auto detection: |
Big +1 from me since cluster-api-provider-aws defaults to containerd now and it's not the nicest experience anymore. One associated problem is that kubeadm is printing a stack trace for users to see in addition to a sufficient message for the user to debug. Kubeadm should only print the error message and not the trace in this case.
My hope is for this issue to fix the inappropriate stack trace. I'll open a separate issue if it is desired. |
This is now implemented and documented, so I close it. |
With CRIs different than Docker gaining more and more popularity, we need to improve the user experience of kubeadm by not having to supply
--cri-socket
on every command if something different than Docker is used.Most of the other CRIs have well known default paths for Unix domain sockets, thus detecting the default installations of CRIs on the local machine should not be too difficult.
Currently kubeadm will fail if
--cri-socket
is not specified and Docker is not installed on the system. But the bigger problem here is that, if--cri-socket
is forgotten and Docker is installed, the wrong CRI could be used and the operation to succeed (like with kubeadm init)./area UX
/area ecosystem
/kind feature
The text was updated successfully, but these errors were encountered: