Closed Teresajw closed 1 year ago
we can add the --cri-socket param to this phase, but you can also pass --config with InitConfiguration.noderegistrationoptions.crisocket check the v1beta3 api docs.
in fact using config is always preferred.
we can add the --cri-socket param to this phase, but you can also pass --config with InitConfiguration.noderegistrationoptions.crisocket check the v1beta3 api docs.
in fact using config is always preferred.
Thanks for the answer. However, this parameter does not take effect. It is prompted that this option is not available. The command prompt given in the reference is like this. This parameter is not included Look at the figure below,it has no parameter as --cri-socket ,not only one ,The kubeadm init phase subcommand does not include
/assign will add the --cri-socket param to this phase
/assign will add the --cri-socket param to this phase no this param
@Teresajw
After https://github.com/kubernetes/kubernetes/pull/114443 merged, the --cri-socket
flag will be available.
For now, you can use configuration to achieve it, like this:
cat <<EOF > kubeadm-init-config
apiVersion: kubeadm.k8s.io/v1beta3
kind: InitConfiguration
nodeRegistration:
criSocket: unix:///var/run/containerd/containerd.sock
EOF
kubeadm init phase upload-certs --upload-certs --config kubeadm-init-config
Many subcommands of kubeadm init phase does not have -- cri socket flag ,It can be repaired together for example kubeadm init phase certs apiserver
@Teresajwkubernetes/kubernetes#114443合并 后,
--cri-socket
flag 将可用。 现在,您可以使用配置来实现它,如下所示:cat <<EOF > kubeadm-init-config apiVersion: kubeadm.k8s.io/v1beta3 kind: InitConfiguration nodeRegistration: criSocket: unix:///var/run/containerd/containerd.sock EOF kubeadm init phase upload-certs --upload-certs --config kubeadm-init-config
I'll try, thanks
Problem encountered
kubelet、kubeadm、kubeclt version
kubelet v1.25.5、kubeadm v1.25.5、kubeclt v1.25.5First-command: kubeadm init phase upload-certs --upload-certs
description:
When I use kubeadm init phase upload certs -- upload certs to upload a certificate, I am prompted that I have not specified criSocket.result:
[root@k8s-master-01 ~]# kubeadm init phase upload-certs --upload-certs Found multiple CRI endpoints on the host. Please define which one do you wish to use by setting the 'criSocket' field in the kubeadm configuration file: unix:///var/run/containerd/containerd.sock, unix:///var/run/cri-dockerd.sock To see the stack trace of this error execute with --v=5 or highersecond-command: kubeadm init phase upload-certs --upload-certs --cri-socket unix:///var/run/cri-dockerd.sock
description:
When I add -- criSocket= unix:///var/run/cri-dockerd.socket After that, I am prompted that there is no -- cri socket parameterresult:
unknown flag: --cri-socket