Answers: <p>You can choose which CRI you would like to use directly from the join command by adding this flag: (see <code>kubeadm join --help</code> for details)</p>
  <pre><code>--cri-socket string
  </code></pre>
  <p>here, string will be one of the two available sockets displayed in the error:</p>
  <ol>
  <li><code>unix:///var/run/containerd/containerd.sock</code></li>
  <li><code>unix:///var/run/cri-dockerd.sock</code></li>
  </ol>
  <p>Or you can also add it to you kubeadm config as stated
  see doc here: <a href="https://kubernetes.io/docs/reference/config-api/kubeadm-config.v1beta3/#kubeadm-k8s-io-v1beta3-NodeRegistrationOptions" rel="nofollow noreferrer">https://kubernetes.io/docs/reference/config-api/kubeadm-config.v1beta3/#kubeadm-k8s-io-v1beta3-NodeRegistrationOptions</a></p>
  
Answers: CC BY-SA 4.0
Answers: 2022-11-16T08:58:52.357Z
Answers: 2022-11-16T08:58:52.357Z
Answers: maxxvw
Answers: <p>I got around this by starting over, installing ubuntu 20.04 and then creating cluster again. But it believe maxxvw is correct.</p>
  
Answers: CC BY-SA 4.0
Answers: 2022-11-26T19:27:01.713Z
Answers: 2022-11-26T19:27:01.713Z
Answers: JasonC
Body: <p>by following the information in <a href="https://www.youtube.com/watch?v=o6bxo0Oeg6o&amp;t=1s" rel="nofollow noreferrer">this video</a>,
  I was able to get a control plane running on my kmaster vm.</p>
  <pre><code>jason@kmaster:~$ kubectl get pods -A
  NAMESPACE     NAME                                       READY   STATUS    RESTARTS   AGE
  kube-system   calico-kube-controllers-59697b644f-tpxnn   1/1     Running   0          18h
  kube-system   calico-node-88l8f                          1/1     Running   0          18h
  kube-system   coredns-565d847f94-vpzwg                   1/1     Running   0          18h
  kube-system   coredns-565d847f94-wkv4p                   1/1     Running   0          18h
  kube-system   etcd-kmaster                               1/1     Running   0          18h
  kube-system   kube-apiserver-kmaster                     1/1     Running   0          18h
  kube-system   kube-controller-manager-kmaster            1/1     Running   0          18h
  kube-system   kube-proxy-wd2gh                           1/1     Running   0          18h
  kube-system   kube-scheduler-kmaster                     1/1     Running   0          18h
  </code></pre>
  <p>Here are my network interfaces:</p>
  <pre><code>jason@kmaster:~$ ip a
  1: lo: &lt;LOOPBACK,UP,LOWER_UP&gt; mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
      link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
      inet 127.0.0.1/8 scope host lo
         valid_lft forever preferred_lft forever
      inet6 ::1/128 scope host
         valid_lft forever preferred_lft forever
  2: ens18: &lt;BROADCAST,MULTICAST,UP,LOWER_UP&gt; mtu 1500 qdisc fq_codel state UP group default qlen 1000
      link/ether e6:ec:4b:b8:37:7a brd ff:ff:ff:ff:ff:ff
      altname enp0s18
      inet 10.0.10.118/24 brd 10.0.10.255 scope global ens18
         valid_lft forever preferred_lft forever
      inet6 2600:8802:5700:46d::164d/128 scope global dynamic noprefixroute
         valid_lft 4863sec preferred_lft 2163sec
      inet6 2600:8802:5700:46d:e4ec:4bff:feb8:377a/64 scope global dynamic mngtmpaddr noprefixroute
         valid_lft 86385sec preferred_lft 14385sec
      inet6 fe80::e4ec:4bff:feb8:377a/64 scope link
         valid_lft forever preferred_lft forever
  3: docker0: &lt;NO-CARRIER,BROADCAST,MULTICAST,UP&gt; mtu 1500 qdisc noqueue state DOWN group default
      link/ether 02:42:bb:62:1c:c5 brd ff:ff:ff:ff:ff:ff
      inet 172.17.0.1/16 brd 172.17.255.255 scope global docker0
         valid_lft forever preferred_lft forever
  4: calida7207728a2@if3: &lt;BROADCAST,MULTICAST,UP,LOWER_UP&gt; mtu 1500 qdisc noqueue state UP group default
      link/ether ee:ee:ee:ee:ee:ee brd ff:ff:ff:ff:ff:ff link-netnsid 0
      inet6 fe80::ecee:eeff:feee:eeee/64 scope link
         valid_lft forever preferred_lft forever
  5: cali919c5dc3a63@if3: &lt;BROADCAST,MULTICAST,UP,LOWER_UP&gt; mtu 1500 qdisc noqueue state UP group default
      link/ether ee:ee:ee:ee:ee:ee brd ff:ff:ff:ff:ff:ff link-netnsid 1
      inet6 fe80::ecee:eeff:feee:eeee/64 scope link
         valid_lft forever preferred_lft forever
  6: cali0657a847784@if3: &lt;BROADCAST,MULTICAST,UP,LOWER_UP&gt; mtu 1500 qdisc noqueue state UP group default
      link/ether ee:ee:ee:ee:ee:ee brd ff:ff:ff:ff:ff:ff link-netnsid 2
      inet6 fe80::ecee:eeff:feee:eeee/64 scope link
         valid_lft forever preferred_lft forever
  7: tunl0@NONE: &lt;NOARP,UP,LOWER_UP&gt; mtu 1480 qdisc noqueue state UNKNOWN group default qlen 1000
      link/ipip 0.0.0.0 brd 0.0.0.0
      inet 192.168.189.0/32 scope global tunl0
         valid_lft forever preferred_lft forever
  </code></pre>
  <p>I am now trying to add a node to the cluster by using the following command:</p>
  <pre><code>sudo kubeadm join 10.0.10.118:6443 --token &lt;token&gt;         --discovery-token-ca-cert-hash sha256:&lt;hash&gt;
  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 higher
  </code></pre>
  <p>As you can see it says 'please define which one you wish to use by setting the 'criSocket' field in the kubeadm configuration file. However when I try to edit /var/run/cri-dockerd.sock file, it says it's not a normal file:</p>
  <pre><code>cri-dockerd.sock is not a regular file (use -f to see it)
  </code></pre>
  <p>Here is my kubeadm config print:</p>
  <pre><code>jason@kmaster:~$ kubectl get pods -A --watch
  NAMESPACE     NAME                                       READY   STATUS    RESTARTS        AGE
  kube-system   calico-kube-controllers-59697b644f-tpxnn   1/1     Running   2 (6m56s ago)   16d
  kube-system   calico-node-88l8f                          1/1     Running   2 (6m56s ago)   16d
  kube-system   coredns-565d847f94-vpzwg                   1/1     Running   2 (6m51s ago)   16d
  kube-system   coredns-565d847f94-wkv4p                   1/1     Running   2 (6m51s ago)   16d
  kube-system   etcd-kmaster                               1/1     Running   2 (6m56s ago)   16d
  kube-system   kube-apiserver-kmaster                     1/1     Running   2 (6m55s ago)   16d
  kube-system   kube-controller-manager-kmaster            1/1     Running   2 (6m56s ago)   16d
  kube-system   kube-proxy-wd2gh                           1/1     Running   2 (6m56s ago)   16d
  kube-system   kube-scheduler-kmaster                     1/1     Running   2 (6m56s ago)   16d
  ^Cjason@kmaster:~kubeadm config print init-defaults
  apiVersion: kubeadm.k8s.io/v1beta3
  bootstrapTokens:
  - groups:
    - system:bootstrappers:kubeadm:default-node-token
    token: abcdef.0123456789abcdef
    ttl: 24h0m0s
    usages:
    - signing
    - authentication
  kind: InitConfiguration
  localAPIEndpoint:
    advertiseAddress: 1.2.3.4
    bindPort: 6443
  nodeRegistration:
    criSocket: unix:///var/run/containerd/containerd.sock
    imagePullPolicy: IfNotPresent
    name: node
    taints: null
  ---
  apiServer:
    timeoutForControlPlane: 4m0s
  apiVersion: kubeadm.k8s.io/v1beta3
  certificatesDir: /etc/kubernetes/pki
  clusterName: kubernetes
  controllerManager: {}
  dns: {}
  etcd:
    local:
      dataDir: /var/lib/etcd
  imageRepository: registry.k8s.io
  kind: ClusterConfiguration
  kubernetesVersion: 1.25.0
  networking:
    dnsDomain: cluster.local
    serviceSubnet: 10.96.0.0/12
  scheduler: {}
  </code></pre>
  <p>Under nodeRegistration it says:
  nodeRegistration:
  criSocket: unix:///var/run/containerd/containerd.sock</p>
  <p>In /var/run/
  I see cri-dockerd.sock</p>
  <pre><code>jason@kmaster:/var/run$ ls -la
  total 28
  srw-rw----  1 root docker    0 Nov 15 00:25 cri-dockerd.sock
  </code></pre>
  <p>How can I add my node to the cluster?</p>
  
Tags: <kubernetes>
Title: kubernetes - trouble adding node to cluster
UserDisplayName: JasonC
ThreadText: # kubernetes - trouble adding node to cluster
  
  (Asked by: username_0 on 2022-10-30)
  
  by following the information in [this video](https://www.youtube.com/watch?v=o6bxo0Oeg6o&t=1s),
  I was able to get a control plane running on my kmaster vm.
  
  ```
  jason@kmaster:~$ kubectl get pods -A
  NAMESPACE     NAME                                       READY   STATUS    RESTARTS   AGE
  kube-system   calico-kube-controllers-59697b644f-tpxnn   1/1     Running   0          18h
  kube-system   calico-node-88l8f                          1/1     Running   0          18h
  kube-system   coredns-565d847f94-vpzwg                   1/1     Running   0          18h
  kube-system   coredns-565d847f94-wkv4p                   1/1     Running   0          18h
  kube-system   etcd-kmaster                               1/1     Running   0          18h
  kube-system   kube-apiserver-kmaster                     1/1     Running   0          18h
  kube-system   kube-controller-manager-kmaster            1/1     Running   0          18h
  kube-system   kube-proxy-wd2gh                           1/1     Running   0          18h
  kube-system   kube-scheduler-kmaster                     1/1     Running   0          18h
  
  ```
  
  Here are my network interfaces:
  
  ```
  jason@kmaster:~$ ip a
  1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
      link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
      inet 127.0.0.1/8 scope host lo
         valid_lft forever preferred_lft forever
      inet6 ::1/128 scope host
         valid_lft forever preferred_lft forever
  2: ens18: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
      link/ether e6:ec:4b:b8:37:7a brd ff:ff:ff:ff:ff:ff
      altname enp0s18
      inet 10.0.10.118/24 brd 10.0.10.255 scope global ens18
         valid_lft forever preferred_lft forever
      inet6 2600:8802:5700:46d::164d/128 scope global dynamic noprefixroute
         valid_lft 4863sec preferred_lft 2163sec
      inet6 2600:8802:5700:46d:e4ec:4bff:feb8:377a/64 scope global dynamic mngtmpaddr noprefixroute
         valid_lft 86385sec preferred_lft 14385sec
      inet6 fe80::e4ec:4bff:feb8:377a/64 scope link
         valid_lft forever preferred_lft forever
  3: docker0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default
      link/ether 02:42:bb:62:1c:c5 brd ff:ff:ff:ff:ff:ff
      inet 172.17.0.1/16 brd 172.17.255.255 scope global docker0
         valid_lft forever preferred_lft forever
  4: calida7207728a2@if3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default
      link/ether ee:ee:ee:ee:ee:ee brd ff:ff:ff:ff:ff:ff link-netnsid 0
      inet6 fe80::ecee:eeff:feee:eeee/64 scope link
         valid_lft forever preferred_lft forever
  5: cali919c5dc3a63@if3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default
      link/ether ee:ee:ee:ee:ee:ee brd ff:ff:ff:ff:ff:ff link-netnsid 1
      inet6 fe80::ecee:eeff:feee:eeee/64 scope link
         valid_lft forever preferred_lft forever
  6: cali0657a847784@if3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default
      link/ether ee:ee:ee:ee:ee:ee brd ff:ff:ff:ff:ff:ff link-netnsid 2
      inet6 fe80::ecee:eeff:feee:eeee/64 scope link
         valid_lft forever preferred_lft forever
  7: tunl0@NONE: <NOARP,UP,LOWER_UP> mtu 1480 qdisc noqueue state UNKNOWN group default qlen 1000
      link/ipip 0.0.0.0 brd 0.0.0.0
      inet 192.168.189.0/32 scope global tunl0
         valid_lft forever preferred_lft forever
  
  ```
  
  I am now trying to add a node to the cluster by using the following command:
  
  ```
  sudo kubeadm join 10.0.10.118:6443 --token <token>         --discovery-token-ca-cert-hash sha256:<hash>
  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 higher
  
  ```
  
  As you can see it says 'please define which one you wish to use by setting the 'criSocket' field in the kubeadm configuration file. However when I try to edit /var/run/cri-dockerd.sock file, it says it's not a normal file:
  
  ```
  cri-dockerd.sock is not a regular file (use -f to see it)
  
  ```
  
  Here is my kubeadm config print:
  
  ```
  jason@kmaster:~$ kubectl get pods -A --watch
  NAMESPACE     NAME                                       READY   STATUS    RESTARTS        AGE
  kube-system   calico-kube-controllers-59697b644f-tpxnn   1/1     Running   2 (6m56s ago)   16d
  kube-system   calico-node-88l8f                          1/1     Running   2 (6m56s ago)   16d
  kube-system   coredns-565d847f94-vpzwg                   1/1     Running   2 (6m51s ago)   16d
  kube-system   coredns-565d847f94-wkv4p                   1/1     Running   2 (6m51s ago)   16d
  kube-system   etcd-kmaster                               1/1     Running   2 (6m56s ago)   16d
  kube-system   kube-apiserver-kmaster                     1/1     Running   2 (6m55s ago)   16d
  kube-system   kube-controller-manager-kmaster            1/1     Running   2 (6m56s ago)   16d
  kube-system   kube-proxy-wd2gh                           1/1     Running   2 (6m56s ago)   16d
  kube-system   kube-scheduler-kmaster                     1/1     Running   2 (6m56s ago)   16d
  ^Cjason@kmaster:~kubeadm config print init-defaults
  apiVersion: kubeadm.k8s.io/v1beta3
  bootstrapTokens:
  - groups:
    - system:bootstrappers:kubeadm:default-node-token
    token: abcdef.0123456789abcdef
    ttl: 24h0m0s
    usages:
    - signing
    - authentication
  kind: InitConfiguration
  localAPIEndpoint:
    advertiseAddress: 1.2.3.4
    bindPort: 6443
  nodeRegistration:
    criSocket: unix:///var/run/containerd/containerd.sock
    imagePullPolicy: IfNotPresent
    name: node
    taints: null
  ---
  apiServer:
    timeoutForControlPlane: 4m0s
  apiVersion: kubeadm.k8s.io/v1beta3
  certificatesDir: /etc/kubernetes/pki
  clusterName: kubernetes
  controllerManager: {}
  dns: {}
  etcd:
    local:
      dataDir: /var/lib/etcd
  imageRepository: registry.k8s.io
  kind: ClusterConfiguration
  kubernetesVersion: 1.25.0
  networking:
    dnsDomain: cluster.local
    serviceSubnet: 10.96.0.0/12
  scheduler: {}
  
  ```
  
  Under nodeRegistration it says:
  nodeRegistration:
  criSocket: unix:///var/run/containerd/containerd.sock
  
  In /var/run/
  I see cri-dockerd.sock
  
  ```
  jason@kmaster:/var/run$ ls -la
  total 28
  srw-rw----  1 root docker    0 Nov 15 00:25 cri-dockerd.sock
  
  ```
  
  How can I add my node to the cluster?
  
  **Tags:** kubernetes
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2022-11-16. Score: 1
  
  You can choose which CRI you would like to use directly from the join command by adding this flag: (see `kubeadm join --help` for details)
  
  ```
  --cri-socket string
  
  ```
  
  here, string will be one of the two available sockets displayed in the error:
  
  1. `unix:///var/run/containerd/containerd.sock`
  2. `unix:///var/run/cri-dockerd.sock`
  
  Or you can also add it to you kubeadm config as stated
  see doc here: <https://kubernetes.io/docs/reference/config-api/kubeadm-config.v1beta3/#kubeadm-k8s-io-v1beta3-NodeRegistrationOptions>
  
  
  ---
  
  ### Answer by username_0 on 2022-11-26. Score: 0
  
  I got around this by starting over, installing ubuntu 20.04 and then creating cluster again. But it believe username_1 is correct.
  
  
  ---
  
  