Closed fhemberger closed 5 years ago
thanks for the report
instead, have you tried passing something like the following as a --config
file to init?
apiVersion: kubeadm.k8s.io/v1beta1
kind: InitConfiguration
nodeRegistration:
criSocket: "unix:///var/run/crio/crio.sock"
---
apiVersion: kubeadm.k8s.io/v1beta1
kind: ClusterConfiguration
kubernetesVersion: "v1.13.1"
networking:
podSubnet: "192.168.0.0/16"
/priority critical-urgent /kind bug /priority awaiting-more-evidence
/assign @rosti @bart0sh PTAL, there seem to be some cri-socket related bugs lurking around as reported here and in #1322
thanks,.
/var/lib/kubelet/kubeadm-flags.env
looks okay:
KUBELET_KUBEADM_ARGS=--container-runtime=remote --container-runtime-endpoint=unix:///var/run/crio/crio.sock --resolv-conf=/run/systemd/resolve/resolv.conf
but still the same result.
kubelet
still seems to use dockerEndpoint
. I did get that right that Docker is no longer required on the host when you use an alternative CRI-based runtime?
kubelet still seems to use dockerEndpoint
if you are seeing --container-runtime-endpoint=unix:///var/run/crio/crio.sock
passed to the kubelet in the systemd logs, then we might be facing a kubelet problem.
try adding --v=2
(1 might be enough) and look at the list of flags near the kubelet start.
also note that the kubelet CLI flags do override the kubelet config.
I did get that right that Docker is no longer required on the host when you use an alternative CRI-based runtime?
yes, that should be the case.
Looking at /lib/systemd/system/kubelet.service
, there are no options passed to the kubelet.
[Unit]
Description=kubelet: The Kubernetes Node Agent
Documentation=https://kubernetes.io/docs/home/
[Service]
ExecStart=/usr/bin/kubelet
Restart=always
StartLimitInterval=0
RestartSec=10
[Install]
WantedBy=multi-user.target
Output of kubelet -v=2
and explicitly passing kubelet --config=/var/lib/kubelet/config.yaml -v=2
is the same (still using the default --container-runtime="docker"
). Only passing the values of KUBELET_KUBEADM_ARGS
directly does the trick (manually copied from /var/lib/kubelet/kubeadm-flags.env
):
kubelet -v=2 \
--container-runtime=remote \
--container-runtime-endpoint=/var/run/crio/crio.sock \
--resolv-conf=/run/systemd/resolve/resolv.conf
I get a deprecation warning:
util_unix.go:77] Using "/var/run/crio/crio.sock" as endpoint is deprecated, please consider using full url format "unix:///var/run/crio/crio.sock".
and afterwards, I'm running into https://github.com/kubernetes/kubernetes/issues/56850, which seems to be resolved by https://github.com/kubernetes/kubernetes/issues/56850#issuecomment-406241077, and a whole bunch of other issues, but that's a different matter.
Looking at /lib/systemd/system/kubelet.service, there are no options passed to the kubelet.
and that should be the case.
/var/lib/kubelet/kubeadm-flags.env
something is not right here. this is a file that is auto-generated by kubeadm on each init and passed to the kubelet from the unit file.
kubelet -v=2 \ --container-runtime=remote \ --container-runtime-endpoint=/var/run/crio/crio.sock \ --resolv-conf=/run/systemd/resolve/resolv.conf
if these are the contents of the file (minus the -v=2
part), kubeadm is doing it's job.
-v=2
should be added to /etc/default/kubelet
.
util_unix.go:77] Using "/var/run/crio/crio.sock" as endpoint is deprecated, please consider using full url format "unix:///var/run/crio/crio.sock".
that's a problem that i've missed yes. please use the unix socket prefix.
whole bunch of other issues, but that's a different matter.
did you resolve, is this issue ready to be closed?
No, I still have to add those options manually to /lib/systemd/system/kubelet.service
for them to work.
Putting them in KUBELET_KUBEADM_ARGS
doesn't seem to have any effect.
No, I still have to add those options manually to /lib/systemd/system/kubelet.service for them to work.
the user should not touch /lib/systemd/system/kubelet.service adding flags in /etc/default/kubelet works for me.
/lifecycle active
Okay, did a complete fresh install of Ubuntu 18.04.1, used only the following config.yaml
:
apiVersion: kubeadm.k8s.io/v1beta1
kind: InitConfiguration
nodeRegistration:
criSocket: "unix:///var/run/crio/crio.sock"
taints:
and didn't specify networking.podSubnet
(we'll see how this turns out later).
I don't get any unix:///var/run/docker.sock
any longer, still running into #1153.
Closing, as this is a different matter. Thanks for your help!
for the record, I just ran into something similar on a fedora37 box that had been initially installed with kubernetes quite a while ago
I got rid of that issue by removing this file
rm /etc/systemd/system/kubelet.service.d/10-kubeadm.conf
that was apparently a leftover from the past, and was superseding the one in /usr/lib/systemd/system/kubelet.service.d/10-kubeadm.conf
I was at first focusing on the plain kubelet.service
file, so maybe checking for this kind of dropins can help out others observing the same symptom
Is this a BUG REPORT or FEATURE REQUEST?
Choose one: BUG REPORT
Versions
kubeadm version (use
kubeadm version
): kubeadm version: &version.Info{Major:"1", Minor:"13", GitVersion:"v1.13.1", GitCommit:"eec55b9ba98609a46fee712359c7b5b365bdd920", GitTreeState:"clean", BuildDate:"2018-12-13T10:36:44Z", GoVersion:"go1.11.2", Compiler:"gc", Platform:"linux/amd64"}Environment:
kubectl version
): Client Version: version.Info{Major:"1", Minor:"13", GitVersion:"v1.13.1", GitCommit:"eec55b9ba98609a46fee712359c7b5b365bdd920", GitTreeState:"clean", BuildDate:"2018-12-13T10:39:04Z", GoVersion:"go1.11.2", Compiler:"gc", Platform:"linux/amd64"}uname -a
): 4.15.0-42-genericWhat happened?
kubelet tries to connect to
unix:///var/run/docker.sock
.What you expected to happen?
kubelet should connect to
unix:///var/run/crio/crio.sock
.How to reproduce it (as minimally and precisely as possible)?
Install cri-o as described here: https://kubernetes.io/docs/setup/cri/
Create config files and run
kubeadm init
:Anything else we need to know?
Might be related to #1322?