mirror of https://github.com/knative/docs.git
181 lines
27 KiB
XML
181 lines
27 KiB
XML
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
|
||
<channel>
|
||
<title>Knative – Upgrading Knative</title>
|
||
<link>https://knative.dev/v0.23-docs/upgrade/</link>
|
||
<description>Recent content in Upgrading Knative on Knative</description>
|
||
<generator>Hugo -- gohugo.io</generator>
|
||
|
||
<atom:link href="https://knative.dev/v0.23-docs/upgrade/index.xml" rel="self" type="application/rss+xml" />
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<item>
|
||
<title>V0.23-Docs: Upgrading Knative</title>
|
||
<link>https://knative.dev/v0.23-docs/upgrade/upgrade-installation/</link>
|
||
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
|
||
|
||
<guid>https://knative.dev/v0.23-docs/upgrade/upgrade-installation/</guid>
|
||
<description>
|
||
|
||
|
||
<p>You can use the <code>kubectl apply</code> command to upgrade your Knative components and plugins.</p>
|
||
<h2 id="before-you-begin">Before you begin</h2>
|
||
<p>Before upgrading, there are a few steps you must take to ensure a successful
|
||
upgrade process.</p>
|
||
<h3 id="identify-breaking-changes">Identify breaking changes</h3>
|
||
<p>You should be aware of any breaking changes between your current and desired
|
||
versions of Knative. Breaking changes between Knative versions are documented in
|
||
the Knative release notes. Before upgrading, review the release notes for the
|
||
target version to learn about any changes you might need to make to your Knative
|
||
applications:</p>
|
||
<ul>
|
||
<li><a href="https://github.com/knative/serving/releases">Serving</a></li>
|
||
<li><a href="https://github.com/knative/eventing/releases">Eventing</a></li>
|
||
</ul>
|
||
<p>Release notes are published with each version on the &ldquo;Releases&rdquo; page of their
|
||
respective repositories in GitHub.</p>
|
||
<h3 id="view-current-pod-status">View current pod status</h3>
|
||
<p>Before upgrading, view the status of the pods for the namespaces you plan on
|
||
upgrading. This allows you to compare the before and after state of your
|
||
namespace. For example, if you are upgrading Knative Serving and Eventing, enter the following commands to see the current state of
|
||
each namespace:</p>
|
||
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">kubectl get pods --namespace knative-serving
|
||
</code></pre></div><div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">kubectl get pods --namespace knative-eventing
|
||
</code></pre></div><h3 id="upgrade-plugins">Upgrade plugins</h3>
|
||
<p>If you have a plugin installed, make sure to upgrade it at the same time as
|
||
you upgrade your Knative components.</p>
|
||
<h3 id="run-pre-install-tools-before-upgrade">Run pre-install tools before upgrade</h3>
|
||
<p>In some upgrades there are some steps that must happen before the actual
|
||
upgrade, and these are identified in the release notes.</p>
|
||
<h3 id="upgrade-existing-resources-to-the-latest-stored-version">Upgrade existing resources to the latest stored version</h3>
|
||
<p>Our custom resources are stored within Kubernetes at a particular version.
|
||
As we introduce newer and remove older supported versions, you must migrate the resources to the designated stored version. This ensures removing older versions
|
||
will succeed when upgrading.</p>
|
||
<p>For the various subprojects there is a K8s job to help operators perform this migration. The release notes for each release will state explicitly whether a migration is required.</p>
|
||
<h2 id="performing-the-upgrade">Performing the upgrade</h2>
|
||
<p>To upgrade, apply the YAML files for the subsequent minor versions of all
|
||
your installed Knative components and features, remembering to only
|
||
upgrade by one minor version at a time. For a cluster running version 0.20 of the Knative Serving and Eventing components, the following command upgrades the installation to v0.22.0:</p>
|
||
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">kubectl apply -f https://github.com/knative/serving/releases/download/v0.22.0/serving-core.yaml <span style="color:#4e9a06">\
|
||
</span><span style="color:#4e9a06"></span>-f https://github.com/knative/eventing/releases/download/v0.22.0/eventing.yaml <span style="color:#4e9a06">\
|
||
</span></code></pre></div><h3 id="run-post-install-tools-after-the-upgrade">Run post-install tools after the upgrade</h3>
|
||
<p>In some upgrades there are some steps that must happen after the actual
|
||
upgrade, and these are identified in the release notes.</p>
|
||
<h2 id="verifying-the-upgrade">Verifying the upgrade</h2>
|
||
<p>To confirm that your components and plugins have successfully upgraded, view the status of their pods in the relevant namespaces.
|
||
All pods will restart during the upgrade and their age will reset.
|
||
If you upgraded Knative Serving and Eventing, enter the following commands to get information about the pods for each namespace:</p>
|
||
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">kubectl get pods --namespace knative-serving
|
||
</code></pre></div><div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">kubectl get pods --namespace knative-eventing
|
||
</code></pre></div><p>These commands return something similar to:</p>
|
||
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">NAME READY STATUS RESTARTS AGE
|
||
activator-79f674fb7b-dgvss 2/2 Running <span style="color:#0000cf;font-weight:bold">0</span> 43s
|
||
autoscaler-96dc49858-b24bm 2/2 Running <span style="color:#0000cf;font-weight:bold">1</span> 43s
|
||
autoscaler-hpa-d887d4895-njtrb 1/1 Running <span style="color:#0000cf;font-weight:bold">0</span> 43s
|
||
controller-6bcdd87fd6-zz9fx 1/1 Running <span style="color:#0000cf;font-weight:bold">0</span> 41s
|
||
networking-istio-7fcd97cbf7-z2xmr 1/1 Running <span style="color:#0000cf;font-weight:bold">0</span> 40s
|
||
webhook-747b799559-4sj6q 1/1 Running <span style="color:#0000cf;font-weight:bold">0</span> 41s
|
||
</code></pre></div><div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">NAME READY STATUS RESTARTS AGE
|
||
eventing-controller-69ffcc6f7d-5l7th 1/1 Running <span style="color:#0000cf;font-weight:bold">0</span> 83s
|
||
eventing-webhook-6c56fcd86c-42dr8 1/1 Running <span style="color:#0000cf;font-weight:bold">0</span> 81s
|
||
imc-controller-6bcf5957b5-6ccp2 1/1 Running <span style="color:#0000cf;font-weight:bold">0</span> 80s
|
||
imc-dispatcher-f59b7c57-q9xcl 1/1 Running <span style="color:#0000cf;font-weight:bold">0</span> 80s
|
||
sources-controller-8596684d7b-jxkmd 1/1 Running <span style="color:#0000cf;font-weight:bold">0</span> 83s
|
||
</code></pre></div><p>If the age of all your pods has been reset and all pods are up and running, the upgrade was completed successfully.
|
||
You might notice a status of <code>Terminating</code> for the old pods as they are cleaned up.</p>
|
||
<p>If necessary, repeat the upgrade process until you reach your desired minor version number.</p>
|
||
|
||
</description>
|
||
</item>
|
||
|
||
<item>
|
||
<title>V0.23-Docs: Upgrading using the Knative Operator</title>
|
||
<link>https://knative.dev/v0.23-docs/upgrade/upgrade-installation-with-operator/</link>
|
||
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
|
||
|
||
<guid>https://knative.dev/v0.23-docs/upgrade/upgrade-installation-with-operator/</guid>
|
||
<description>
|
||
|
||
|
||
<p>The attribute <code>spec.version</code> is the only field you need to change in the
|
||
Serving or Eventing custom resource to perform an upgrade. You do not need to specify the version for the <code>patch</code> number, because the Knative Operator matches the latest available <code>patch</code> number, as long as you specify <code>major.minor</code> for the version. For example, you only need to specify <code>&quot;0.22&quot;</code> to upgrade to the 0.22 release, you do not need to specify the exact <code>patch</code> number.</p>
|
||
<p>The Knative Operator supports up to the last three major releases. For example, if the current version of the Operator is 0.22, it bundles and supports the installation of Knative versions 0.19, 0.20, 0.21 and 0.22.</p>
|
||
<p><strong>NOTE:</strong> In the following examples, Knative Serving custom resources are installed in the <code>knative-serving</code> namespace, and Knative Eventing custom resources are installed in the <code>knative-eventing</code> namespace.</p>
|
||
<h2 id="performing-the-upgrade">Performing the upgrade</h2>
|
||
<p>To upgrade, apply the Operator custom resources, adding the <code>spec.version</code> for the Knative version that you want to upgrade to:</p>
|
||
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml"><span style="color:#000">kubectl apply -f - &lt;&lt;EOF</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">apiVersion</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">operator.knative.dev/v1alpha1</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">kind</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">KnativeServing</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">metadata</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">name</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">knative-serving</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">namespace</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">knative-serving</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">spec</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">version</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;0.22&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#000">EOF</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span></code></pre></div><h2 id="verifying-the-upgrade">Verifying the upgrade</h2>
|
||
<p>To confirm that your Knative components have successfully upgraded, view the status of their pods in the relevant namespaces.
|
||
All pods will restart during the upgrade and their age will reset.
|
||
If you upgraded Knative Serving and Eventing, enter the following commands to get information about the pods for each namespace:</p>
|
||
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">kubectl get pods --namespace knative-serving
|
||
</code></pre></div><div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">kubectl get pods --namespace knative-eventing
|
||
</code></pre></div><p>These commands return something similar to:</p>
|
||
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">NAME READY STATUS RESTARTS AGE
|
||
activator-6875896748-gdjgs 1/1 Running <span style="color:#0000cf;font-weight:bold">0</span> 58s
|
||
autoscaler-6bbc885cfd-vkrgg 1/1 Running <span style="color:#0000cf;font-weight:bold">0</span> 57s
|
||
autoscaler-hpa-5cdd7c6b69-hxzv4 1/1 Running <span style="color:#0000cf;font-weight:bold">0</span> 55s
|
||
controller-64dd4bd56-wzb2k 1/1 Running <span style="color:#0000cf;font-weight:bold">0</span> 57s
|
||
istio-webhook-75cc84fbd4-dkcgt 1/1 Running <span style="color:#0000cf;font-weight:bold">0</span> 50s
|
||
networking-istio-6dcbd4b5f4-mxm8q 1/1 Running <span style="color:#0000cf;font-weight:bold">0</span> 51s
|
||
storage-version-migration-serving-serving-0.20.0-82hjt 0/1 Completed <span style="color:#0000cf;font-weight:bold">0</span> 50s
|
||
webhook-75f5d4845d-zkrdt 1/1 Running <span style="color:#0000cf;font-weight:bold">0</span> 56s
|
||
</code></pre></div><div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">NAME READY STATUS RESTARTS AGE
|
||
eventing-controller-6bc59c9fd7-6svbm 1/1 Running <span style="color:#0000cf;font-weight:bold">0</span> 38s
|
||
eventing-webhook-85cd479f87-4dwxh 1/1 Running <span style="color:#0000cf;font-weight:bold">0</span> 38s
|
||
imc-controller-97c4fd87c-t9mnm 1/1 Running <span style="color:#0000cf;font-weight:bold">0</span> 33s
|
||
imc-dispatcher-c6db95ffd-ln4mc 1/1 Running <span style="color:#0000cf;font-weight:bold">0</span> 33s
|
||
mt-broker-controller-5f87fbd5d9-m69cd 1/1 Running <span style="color:#0000cf;font-weight:bold">0</span> 32s
|
||
mt-broker-filter-5b9c64cbd5-d27p4 1/1 Running <span style="color:#0000cf;font-weight:bold">0</span> 32s
|
||
mt-broker-ingress-55c66fdfdf-gn56g 1/1 Running <span style="color:#0000cf;font-weight:bold">0</span> 32s
|
||
storage-version-migration-eventing-0.20.0-fvgqf 0/1 Completed <span style="color:#0000cf;font-weight:bold">0</span> 31s
|
||
sugar-controller-684d5cfdbb-67vsv 1/1 Running <span style="color:#0000cf;font-weight:bold">0</span> 31s
|
||
</code></pre></div><p>You can also verify the status of Knative by checking the custom resources:</p>
|
||
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">kubectl get KnativeServing knative-serving --namespace knative-serving
|
||
</code></pre></div><div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">kubectl get KnativeEventing knative-eventing --namespace knative-eventing
|
||
</code></pre></div><p>These commands return something similar to:</p>
|
||
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">NAME VERSION READY REASON
|
||
knative-serving 0.20.0 True
|
||
</code></pre></div><div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">NAME VERSION READY REASON
|
||
knative-eventing 0.20.0 True
|
||
</code></pre></div><h2 id="rollback">Rollback</h2>
|
||
<p>If the upgrade fails, you can rollback to restore your Knative to the previous version. For example, if something goes wrong with an upgrade to 0.22, and your previous version is 0.21, you can apply the following custom resources to restore Knative Serving and Eventing to version 0.21.</p>
|
||
<p>For Knative Serving:</p>
|
||
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml"><span style="color:#000">kubectl apply -f - &lt;&lt;EOF</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">apiVersion</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">operator.knative.dev/v1alpha1</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">kind</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">KnativeServing</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">metadata</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">name</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">knative-serving</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">namespace</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">knative-serving</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">spec</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">version</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;0.21&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#000">EOF</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span></code></pre></div><p>For Knative Eventing:</p>
|
||
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml"><span style="color:#000">kubectl apply -f - &lt;&lt;EOF</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">apiVersion</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">operator.knative.dev/v1alpha1</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">kind</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">KnativeEventing</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">metadata</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">name</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">knative-eventing</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">namespace</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">knative-eventing</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">spec</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">version</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;0.21&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#000">EOF</span><span style="color:#f8f8f8;text-decoration:underline">
|
||
</span></code></pre></div>
|
||
</description>
|
||
</item>
|
||
|
||
</channel>
|
||
</rss>
|