diff --git a/source/clear-linux/tutorials/kubernetes.rst b/source/clear-linux/tutorials/kubernetes.rst index ca53bc4f..b5761750 100644 --- a/source/clear-linux/tutorials/kubernetes.rst +++ b/source/clear-linux/tutorials/kubernetes.rst @@ -199,16 +199,57 @@ Install pod network add-on ************************** You must choose and install a `pod network add-on`_ to allow your pods to -communicate. +communicate. Check whether or not your add-on requires special flags when you +initialize the master control plane. -Check whether or not your add-on requires special flags when you initialize -the master control plane. For example, if you choose the `flannel` add-on, -then you must add :command:`--pod-network-cidr 10.244.0.0/16` to the `kubeadm -init` command. +**Notes about flannel add-on** -Similarly, if you choose the `weave` add-on, then you must change the CNI -add-on directory parameter because the weave plugin installs itself in the -:file:`/opt/cni/bin` directory. +If you choose the `flannel` add-on, then you must add the following to the +`kubeadm init` command: + +.. code-block:: bash + + --pod-network-cidr 10.244.0.0/16 + +If you are using CRI-O and `flannel` and you want to use Kata Containers, edit +the :file:`/etc/crio/crio.conf` file to add: + +.. code-block:: bash + + [crio.runtime] + manage_network_ns_lifecycle = true + +**Notes about Weave Net add-on** + +If you choose the `Weave Net` add-on, then you must make the following changes +because it installs itself in the :file:`/opt/cni/bin` directory. + +If you are using Docker and `Weave Net`, edit the :file:`kubeadm.conf` file to +add: + +.. code-block:: bash + + Environment="KUBELET_NETWORK_ARGS=--network-plugin=cni --cni-conf-dir=/etc/cni/net.d --cni-bin-dir=/opt/cni/bin" + +If you are using CRI-O and `Weave Net`, you must complete the following steps. + +#. Edit the :file:`/etc/crio/crio.conf` file to change `plugin_dir` from: + + .. code-block:: bash + + plugin_dir = "/usr/libexec/cni/" + + to: + + .. code-block:: bash + + plugin_dir = "/opt/cni/bin" + +#. Add the `loopback` CNI plugin to the plugin path with the command: + + .. code-block:: bash + + sudo ln -s /usr/libexec/cni/loopback /opt/cni/bin/loopback Use your cluster