From 355179a4874bbd29175742e0ffc16cc5e5694113 Mon Sep 17 00:00:00 2001 From: Michael Vincerra Date: Fri, 8 Feb 2019 10:24:36 -0800 Subject: [PATCH 1/6] Replaces content in Install pod network add-on w symlinks. - Provides bash script to manage default plugin_dir - Closes #392 Signed-off-by: Michael Vincerra --- source/clear-linux/tutorials/kubernetes.rst | 50 +++++++-------------- 1 file changed, 15 insertions(+), 35 deletions(-) diff --git a/source/clear-linux/tutorials/kubernetes.rst b/source/clear-linux/tutorials/kubernetes.rst index f05d4109..ad1d376c 100644 --- a/source/clear-linux/tutorials/kubernetes.rst +++ b/source/clear-linux/tutorials/kubernetes.rst @@ -45,7 +45,7 @@ bundle. .. note:: - CRI-O’s default plugin_dir is :file:`/opt/bin/cni`. + CRI-O’s default plugin_dir is :file:`/opt/cni/bin`. CNI plugins are installed as part of ``cloud-native-basic``. To install this framework, enter the following command: @@ -158,7 +158,6 @@ Configure and run CRI-O + kata-runtime sudo kubeadm init --cri-socket=/run/crio/crio.sock - Install pod network add-on ************************** @@ -166,46 +165,27 @@ You must choose and install a `pod network add-on`_ to allow your pods to communicate. Check whether or not your add-on requires special flags when you initialize the master control plane. -**Notes about flannel add-on** - -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 - -Create a symlink for the network overlays: - -.. code-block:: bash - - sudo ln -s /usr/libexec/cni /opt/cni/bin +The CRI-O default plugin_dir is :file:`/opt/cni/bin`. This must be a +writable directory because third-party networking add-ons will install +themselves there. .. note:: - |CL| installs CNI plugins that are part of the `cloud-native-basic` - bundle to :file:`/usr/libexec/cni`. The directory is required because ` - swupd verify` may use it to repair a system to a known good state. + CNI plugins provided by |CL| are installed as part of *cloud-native-basic* + in :file:`/usr/libexec/cni/` and are currently *not* found by CRI-O by + default. These separate directories are required because `swupd` controls + the content of :file:`/usr` and leaves :file:`/opt` unchanged. -**Notes about Weave Net add-on** - -If you choose the `Weave Net` add-on, you must make the following -changes because it installs itself in the :file:`/opt/cni/bin` directory. - -For using CRI-O and ``Weave Net``, complete the following step. - -Add the `loopback` CNI plugin to the plugin path with the command: +When using third-party network add-ons that rely on those plugins, such as +Weave or Flannel do, make them available by creating symlinks: .. code-block:: bash - sudo ln -s /usr/libexec/cni/loopback /opt/bin/cni/loopback + sudo mkdir -p /opt/cni/bin + +.. code-block:: bash + + for i in /usr/libexec/cni/*; do sudo ln -sf $i /opt/bin/cni/; done Use your cluster **************** From d7f3b3d24397f493b4fccb3de977401a2e138d40 Mon Sep 17 00:00:00 2001 From: Michael Vincerra Date: Fri, 8 Feb 2019 10:36:45 -0800 Subject: [PATCH 2/6] Shortens title. :) Signed-off-by: Michael Vincerra --- source/clear-linux/tutorials/kubernetes.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/clear-linux/tutorials/kubernetes.rst b/source/clear-linux/tutorials/kubernetes.rst index ad1d376c..ef04590c 100644 --- a/source/clear-linux/tutorials/kubernetes.rst +++ b/source/clear-linux/tutorials/kubernetes.rst @@ -1,7 +1,7 @@ .. _kubernetes: -Run Kubernetes\* on |CL-ATTR| -############################# +Run Kubernetes\* +################ This tutorial describes how to install, configure, and run the `Kubernetes container orchestration system`_ on |CL-ATTR| using CRI+O and From 546bab0a963745b516c634e3e8c87cfe11c081f5 Mon Sep 17 00:00:00 2001 From: Michael Vincerra Date: Fri, 8 Feb 2019 12:26:52 -0800 Subject: [PATCH 3/6] Revises symlink for loop to point to: opt/cni/bin Signed-off-by: Michael Vincerra --- source/clear-linux/tutorials/kubernetes.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/clear-linux/tutorials/kubernetes.rst b/source/clear-linux/tutorials/kubernetes.rst index ef04590c..790f2fb7 100644 --- a/source/clear-linux/tutorials/kubernetes.rst +++ b/source/clear-linux/tutorials/kubernetes.rst @@ -185,7 +185,7 @@ Weave or Flannel do, make them available by creating symlinks: .. code-block:: bash - for i in /usr/libexec/cni/*; do sudo ln -sf $i /opt/bin/cni/; done + for i in /usr/libexec/cni/*; do sudo ln -sf $i /opt/cni/bin; done Use your cluster **************** From e04eeec536a576d8869afe682a5216d64b267167 Mon Sep 17 00:00:00 2001 From: Michael Vincerra Date: Fri, 8 Feb 2019 12:41:57 -0800 Subject: [PATCH 4/6] Removes line `sudo systemctl restart kubelet`; deprecated. - Closes Issue #388 Signed-off-by: Michael Vincerra --- source/clear-linux/tutorials/kubernetes.rst | 1 - 1 file changed, 1 deletion(-) diff --git a/source/clear-linux/tutorials/kubernetes.rst b/source/clear-linux/tutorials/kubernetes.rst index 790f2fb7..122b5719 100644 --- a/source/clear-linux/tutorials/kubernetes.rst +++ b/source/clear-linux/tutorials/kubernetes.rst @@ -150,7 +150,6 @@ Configure and run CRI-O + kata-runtime sudo systemctl daemon-reload sudo systemctl restart crio - sudo systemctl restart kubelet #. Initialize the master control plane with the command: From f67cf636d71687b0d02d1a371a6049af440021ea Mon Sep 17 00:00:00 2001 From: Michael Vincerra Date: Mon, 11 Feb 2019 10:56:17 -0800 Subject: [PATCH 5/6] Adds back notes on Weave Net and flannel. Signed-off-by: Michael Vincerra --- source/clear-linux/tutorials/kubernetes.rst | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/source/clear-linux/tutorials/kubernetes.rst b/source/clear-linux/tutorials/kubernetes.rst index 122b5719..6dd90b09 100644 --- a/source/clear-linux/tutorials/kubernetes.rst +++ b/source/clear-linux/tutorials/kubernetes.rst @@ -186,6 +186,27 @@ Weave or Flannel do, make them available by creating symlinks: for i in /usr/libexec/cni/*; do sudo ln -sf $i /opt/cni/bin; done +**Notes about Weave Net add-on** + +The Weave Net add-on works by default when the above configuration is done. + +**Notes about flannel add-on** + +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 + Use your cluster **************** From 78b56df417a5a8d12613042bd4da1f2848c6b71f Mon Sep 17 00:00:00 2001 From: Michael Vincerra Date: Mon, 11 Feb 2019 12:09:57 -0800 Subject: [PATCH 6/6] Revises note in `Install Kubernetes and CRI runtimes." Signed-off-by: Michael Vincerra --- .../tutorials/kubernetes/kubernetes.rst | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/source/clear-linux/tutorials/kubernetes/kubernetes.rst b/source/clear-linux/tutorials/kubernetes/kubernetes.rst index 9b559529..c8c65a3a 100644 --- a/source/clear-linux/tutorials/kubernetes/kubernetes.rst +++ b/source/clear-linux/tutorials/kubernetes/kubernetes.rst @@ -1,12 +1,7 @@ .. _kubernetes: -<<<<<<< HEAD:source/clear-linux/tutorials/kubernetes.rst Run Kubernetes\* ################ -======= -Run Kubernetes -############## ->>>>>>> master:source/clear-linux/tutorials/kubernetes/kubernetes.rst This tutorial describes how to install, configure, and run the `Kubernetes container orchestration system`_ on |CL-ATTR| using CRI+O and @@ -48,17 +43,16 @@ Kubernetes, a set of supported :abbr:`CRI (Container Runtime Interface)` runtimes, and networking plugins, are included in the `cloud-native-basic`_ bundle. -.. note:: - - CRI-O’s default plugin_dir is :file:`/opt/cni/bin`. - CNI plugins are installed as part of ``cloud-native-basic``. - To install this framework, enter the following command: .. code-block:: bash sudo swupd bundle-add cloud-native-basic +.. note:: + + For more on networking plugins, see `Install pod network add-on`_. + Configure Kubernetes ********************