mirror of
https://github.com/clearlinux/clear-linux-documentation.git
synced 2026-04-29 11:38:23 +00:00
218 lines
11 KiB
HTML
218 lines
11 KiB
HTML
|
|
<!DOCTYPE html>
|
|
|
|
<html lang="en" data-content_root="../">
|
|
<head>
|
|
<meta charset="utf-8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
|
|
<title>Kubernetes* Best Practices — Documentation for Clear Linux* project</title>
|
|
<link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=fa44fd50" />
|
|
<link rel="stylesheet" type="text/css" href="../_static/bizstyle.css?v=5283bb3d" />
|
|
<link rel="stylesheet" type="text/css" href="../_static/copybutton.css?v=76b2166b" />
|
|
|
|
<script src="../_static/documentation_options.js?v=5929fcd5"></script>
|
|
<script src="../_static/doctools.js?v=9bcbadda"></script>
|
|
<script src="../_static/sphinx_highlight.js?v=dc90522c"></script>
|
|
<script src="../_static/clipboard.min.js?v=a7894cd8"></script>
|
|
<script src="../_static/copybutton.js?v=a56c686a"></script>
|
|
<script src="../_static/bizstyle.js"></script>
|
|
<link rel="canonical" href="https://clearlinux.github.io/clear-linux-documentation/tutorials/kubernetes-bp.html" />
|
|
<link rel="icon" href="../_static/favicon.ico"/>
|
|
<link rel="author" title="About these documents" href="../about.html" />
|
|
<link rel="index" title="Index" href="../genindex.html" />
|
|
<link rel="search" title="Search" href="../search.html" />
|
|
<link rel="next" title="LAMP Web Server" href="lamp-server.html" />
|
|
<link rel="prev" title="Kubernetes*" href="kubernetes.html" />
|
|
<meta name="viewport" content="width=device-width,initial-scale=1.0" />
|
|
<!--[if lt IE 9]>
|
|
<script src="_static/css3-mediaqueries.js"></script>
|
|
<![endif]-->
|
|
</head><body>
|
|
<div class="related" role="navigation" aria-label="Related">
|
|
<h3>Navigation</h3>
|
|
<ul>
|
|
<li class="right" style="margin-right: 10px">
|
|
<a href="../genindex.html" title="General Index"
|
|
accesskey="I">index</a></li>
|
|
<li class="right" >
|
|
<a href="lamp-server.html" title="LAMP Web Server"
|
|
accesskey="N">next</a> |</li>
|
|
<li class="right" >
|
|
<a href="kubernetes.html" title="Kubernetes*"
|
|
accesskey="P">previous</a> |</li>
|
|
<li class="nav-item nav-item-0"><a href="../index.html">Documentation for Clear Linux* project</a> »</li>
|
|
<li class="nav-item nav-item-1"><a href="index.html" accesskey="U">Tutorials</a> »</li>
|
|
<li class="nav-item nav-item-this"><a href="">Kubernetes* Best Practices</a></li>
|
|
</ul>
|
|
</div>
|
|
|
|
<div class="document">
|
|
<div class="documentwrapper">
|
|
<div class="bodywrapper">
|
|
<div class="body" role="main">
|
|
|
|
<section id="kubernetes-best-practices">
|
|
<span id="kubernetes-bp"></span><h1>Kubernetes* Best Practices<a class="headerlink" href="#kubernetes-best-practices" title="Link to this heading">¶</a></h1>
|
|
<p>This tutorial shows you how to manage your Kubernetes cluster while using
|
|
<strong class="command">swupd</strong> to update Clear Linux* OS.</p>
|
|
<nav class="contents local" id="contents">
|
|
<ul class="simple">
|
|
<li><p><a class="reference internal" href="#description" id="id2">Description</a></p></li>
|
|
<li><p><a class="reference internal" href="#prerequisites" id="id3">Prerequisites</a></p></li>
|
|
<li><p><a class="reference internal" href="#update-the-control-plane" id="id4">Update the control plane</a></p></li>
|
|
<li><p><a class="reference internal" href="#update-worker-nodes" id="id5">Update worker nodes</a></p></li>
|
|
</ul>
|
|
</nav>
|
|
<section id="description">
|
|
<h2><a class="toc-backref" href="#id2" role="doc-backlink">Description</a><a class="headerlink" href="#description" title="Link to this heading">¶</a></h2>
|
|
<p>In our <a class="reference internal" href="kubernetes.html#kubernetes"><span class="std std-ref">Kubernetes*</span></a> tutorial, we explain how to set up a Kubernetes
|
|
cluster on Clear Linux OS using <cite>kubeadm</cite>. <a class="reference external" href="https://kubernetes.io/docs/reference/setup-tools/kubeadm/kubeadm-upgrade/">Kubeadm documentation</a> often builds on the
|
|
assumption that the distribution uses a traditional package manager, such as
|
|
RPM/DEB.</p>
|
|
<p>However, Clear Linux OS uses <cite>swupd</cite> to update the OS, which in this case updates
|
|
all of the kubernetes node and client binaries simultaneously, as part of
|
|
the <cite>cloud-native-basic</cite> bundle (e.g., kubectl, kubeadm, kubelet). Running
|
|
<strong class="command">sudo swupd update</strong> requires special care to ensure the OS
|
|
incorporates the latest Kubernetes upgrades.</p>
|
|
<p>This tutorial also describes the best practices for managing cluster upgrades
|
|
with kubeadm on a Clear Linux OS-based cluster.</p>
|
|
</section>
|
|
<section id="prerequisites">
|
|
<h2><a class="toc-backref" href="#id3" role="doc-backlink">Prerequisites</a><a class="headerlink" href="#prerequisites" title="Link to this heading">¶</a></h2>
|
|
<ul class="simple">
|
|
<li><p>Complete the <a class="reference internal" href="kubernetes.html#kubernetes"><span class="std std-ref">Kubernetes*</span></a> tutorial</p></li>
|
|
<li><p>Install the bundle <cite>cloud-native-basic</cite></p></li>
|
|
</ul>
|
|
<div class="admonition note">
|
|
<p class="admonition-title">Note</p>
|
|
<p>Other Linux* distros shown in the Kubernetes upgrade documentation use the
|
|
<cite>apt-get update</cite>, <cite>apt-mark hold kubeadm</cite>, and similar commands. These
|
|
commands <strong>are not valid</strong> on Clear Linux OS.</p>
|
|
</div>
|
|
</section>
|
|
<section id="update-the-control-plane">
|
|
<h2><a class="toc-backref" href="#id4" role="doc-backlink">Update the control plane</a><a class="headerlink" href="#update-the-control-plane" title="Link to this heading">¶</a></h2>
|
|
<ol class="arabic">
|
|
<li><p>Read the kubernetes documentation <a class="reference external" href="https://kubernetes.io/docs/tasks/administer-cluster/kubeadm/kubeadm-upgrade-1-13/#before-you-begin">before you begin</a>.</p></li>
|
|
<li><p>On your master node, run the command:</p>
|
|
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>sudo<span class="w"> </span>swupd<span class="w"> </span>update
|
|
</pre></div>
|
|
</div>
|
|
<div class="admonition note">
|
|
<p class="admonition-title">Note</p>
|
|
<p>If the minor version of Kubernetes changes, Clear Linux OS shows a message-of-the-
|
|
day, or <cite>motd</cite>. When the motd appears, you <strong>must postpone</strong> a kubelet
|
|
restart on master and nodes until the control plane is properly updated.
|
|
<strong class="command">swupd update</strong> does not restart services automatically unless
|
|
explicitly configured to do so.</p>
|
|
</div>
|
|
</li>
|
|
<li><p>Now follow these instructions from the kubernetes documentation.</p>
|
|
<ul class="simple">
|
|
<li><p><a class="reference external" href="https://kubernetes.io/docs/tasks/administer-cluster/kubeadm/kubeadm-upgrade-1-13/#upgrade-the-control-plane-node">Upgrade control plane</a></p></li>
|
|
<li><p><a class="reference external" href="https://kubernetes.io/docs/tasks/administer-cluster/kubeadm/kubeadm-upgrade-1-13/#drain-control-plane-and-worker-nodes">Drain control plane node</a></p></li>
|
|
<li><p><a class="reference external" href="https://kubernetes.io/docs/tasks/administer-cluster/kubeadm/kubeadm-upgrade-1-13/#restart-the-kubelet-for-all-nodes">Restart Kubelet and undrain node</a></p></li>
|
|
</ul>
|
|
</li>
|
|
</ol>
|
|
</section>
|
|
<section id="update-worker-nodes">
|
|
<h2><a class="toc-backref" href="#id5" role="doc-backlink">Update worker nodes</a><a class="headerlink" href="#update-worker-nodes" title="Link to this heading">¶</a></h2>
|
|
<ol class="arabic">
|
|
<li><p>On each worker node, run the command:</p>
|
|
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>sudo<span class="w"> </span>swupd<span class="w"> </span>update
|
|
</pre></div>
|
|
</div>
|
|
</li>
|
|
<li><p>Now follow these instructions from the kubernetes documentation:</p>
|
|
<ul class="simple">
|
|
<li><p><a class="reference external" href="https://kubernetes.io/docs/tasks/administer-cluster/kubeadm/kubeadm-upgrade-1-13/#drain-control-plane-and-worker-nodes">Drain node</a></p></li>
|
|
<li><p><a class="reference external" href="https://kubernetes.io/docs/tasks/administer-cluster/kubeadm/kubeadm-upgrade-1-13/#upgrade-the-kubelet-config-on-worker-nodes">Update kubelet configuration</a></p></li>
|
|
<li><p><a class="reference external" href="https://kubernetes.io/docs/tasks/administer-cluster/kubeadm/kubeadm-upgrade-1-13/#restart-the-kubelet-for-all-nodes">Restart Kubelet and undrain node</a></p></li>
|
|
</ul>
|
|
</li>
|
|
</ol>
|
|
<blockquote>
|
|
<div></div></blockquote>
|
|
</section>
|
|
</section>
|
|
|
|
|
|
<div class="clearer"></div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="sphinxsidebar" role="navigation" aria-label="Main">
|
|
<div class="sphinxsidebarwrapper">
|
|
<p class="logo"><a href="../index.html">
|
|
<img class="logo" src="../_static/clearlinux.png" alt="Logo of Clear Linux* Project Docs"/>
|
|
</a></p>
|
|
<div>
|
|
<h3><a href="../index.html">Table of Contents</a></h3>
|
|
<ul>
|
|
<li><a class="reference internal" href="#">Kubernetes* Best Practices</a><ul>
|
|
<li><a class="reference internal" href="#description">Description</a></li>
|
|
<li><a class="reference internal" href="#prerequisites">Prerequisites</a></li>
|
|
<li><a class="reference internal" href="#update-the-control-plane">Update the control plane</a></li>
|
|
<li><a class="reference internal" href="#update-worker-nodes">Update worker nodes</a></li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
|
|
</div>
|
|
<div>
|
|
<h4>Previous topic</h4>
|
|
<p class="topless"><a href="kubernetes.html"
|
|
title="previous chapter">Kubernetes*</a></p>
|
|
</div>
|
|
<div>
|
|
<h4>Next topic</h4>
|
|
<p class="topless"><a href="lamp-server.html"
|
|
title="next chapter">LAMP Web Server</a></p>
|
|
</div>
|
|
<div role="note" aria-label="source link">
|
|
<h3>This Page</h3>
|
|
<ul class="this-page-menu">
|
|
<li><a href="../_sources/tutorials/kubernetes-bp.rst.txt"
|
|
rel="nofollow">Show Source</a></li>
|
|
</ul>
|
|
</div>
|
|
<search id="searchbox" style="display: none" role="search">
|
|
<h3 id="searchlabel">Quick search</h3>
|
|
<div class="searchformwrapper">
|
|
<form class="search" action="../search.html" method="get">
|
|
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
|
|
<input type="submit" value="Go" />
|
|
</form>
|
|
</div>
|
|
</search>
|
|
<script>document.getElementById('searchbox').style.display = "block"</script>
|
|
</div>
|
|
</div>
|
|
<div class="clearer"></div>
|
|
</div>
|
|
<div class="related" role="navigation" aria-label="Related">
|
|
<h3>Navigation</h3>
|
|
<ul>
|
|
<li class="right" style="margin-right: 10px">
|
|
<a href="../genindex.html" title="General Index"
|
|
>index</a></li>
|
|
<li class="right" >
|
|
<a href="lamp-server.html" title="LAMP Web Server"
|
|
>next</a> |</li>
|
|
<li class="right" >
|
|
<a href="kubernetes.html" title="Kubernetes*"
|
|
>previous</a> |</li>
|
|
<li class="nav-item nav-item-0"><a href="../index.html">Documentation for Clear Linux* project</a> »</li>
|
|
<li class="nav-item nav-item-1"><a href="index.html" >Tutorials</a> »</li>
|
|
<li class="nav-item nav-item-this"><a href="">Kubernetes* Best Practices</a></li>
|
|
</ul>
|
|
</div>
|
|
<div class="footer" role="contentinfo">
|
|
© Copyright 2022 Intel Corporation. All Rights Reserved..
|
|
Last updated on Nov 04, 2024.
|
|
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 8.1.3.
|
|
</div>
|
|
</body>
|
|
</html> |