<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Installation on SpinKube</title><link>/zh-cn/tags/installation/</link><description>Recent content in Installation on SpinKube</description><generator>Hugo</generator><language>zh-cn</language><lastBuildDate>Mon, 23 Nov 2026 16:15:30 +0800</lastBuildDate><atom:link href="/zh-cn/tags/installation/index.xml" rel="self" type="application/rss+xml"/><item><title>使用 Helm 安装</title><link>/zh-cn/docs/install/installing-with-helm/</link><pubDate>Fri, 16 Feb 2024 00:00:00 +0000</pubDate><guid>/zh-cn/docs/install/installing-with-helm/</guid><description>&lt;h2 id="前置条件">前置条件&lt;a class="td-heading-self-link" href="#%e5%89%8d%e7%bd%ae%e6%9d%a1%e4%bb%b6" aria-label="Heading self-link">&lt;/a>&lt;/h2>
&lt;p>对于本指南，你特别需要：&lt;/p>
&lt;ul>
&lt;li>&lt;a href="https://kubernetes.io/docs/tasks/tools/">kubectl&lt;/a> - Kubernetes 命令行工具&lt;/li>
&lt;li>&lt;a href="https://helm.sh">Helm&lt;/a> - Kubernetes 的包管理器&lt;/li>
&lt;/ul>
&lt;h2 id="使用-helm-安装-spin-operator">使用 Helm 安装 Spin Operator&lt;a class="td-heading-self-link" href="#%e4%bd%bf%e7%94%a8-helm-%e5%ae%89%e8%a3%85-spin-operator" aria-label="Heading self-link">&lt;/a>&lt;/h2>
&lt;p>以下说明介绍如何使用 Helm chart（通过 &lt;code>helm install&lt;/code>）安装 Spin Operator。&lt;/p>
&lt;h3 id="准备集群">准备集群&lt;a class="td-heading-self-link" href="#%e5%87%86%e5%a4%87%e9%9b%86%e7%be%a4" aria-label="Heading self-link">&lt;/a>&lt;/h3>
&lt;p>安装 chart 之前，你需要确保以下组件已安装：&lt;/p>
&lt;ul>
&lt;li>&lt;a href="https://github.com/cert-manager/cert-manager">cert-manager&lt;/a>，用于自动 provision 和管理
TLS 证书（供 spin-operator 的准入 webhook 系统使用）。详细的安装
说明请参阅 &lt;a href="https://cert-manager.io/docs/installation/">cert-manager 文档&lt;/a>。&lt;/li>
&lt;/ul>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#e0def4;background-color:#191724;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.20.0/cert-manager.yaml
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;ul>
&lt;li>&lt;a href="https://github.com/spinframework/runtime-class-manager">Runtime Class Manager&lt;/a>，用于在尚未包含 WebAssembly shim 的 Kubernetes 节点上安装 shim。更多细节请参阅项目的 &lt;a href="https://github.com/spinframework/runtime-class-manager/blob/main/README.md">README.md&lt;/a>。&lt;/li>
&lt;/ul>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#e0def4;background-color:#191724;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#6e6a86"># Install Runtime Class Manager&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>helm upgrade --install runtime-class-manager &lt;span style="color:#31748f">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#31748f">&lt;/span> --namespace runtime-class-manager &lt;span style="color:#31748f">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#31748f">&lt;/span> --create-namespace &lt;span style="color:#31748f">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#31748f">&lt;/span> --version 0.2.0 &lt;span style="color:#31748f">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#31748f">&lt;/span> oci://ghcr.io/spinframework/charts/runtime-class-manager
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#6e6a86"># Create Shim resource for installing the containerd-shim-spin binary&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>kubectl apply -f https://github.com/spinframework/containerd-shim-spin/releases/download/v0.27.2/runtime-class-manager-shim-v1alpha1-v0.27.2.yaml
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#6e6a86"># Label all Nodes where the shim should be installed (and thus where Spin Apps may run)&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#6e6a86"># Note: this specific key and value matches the nodeSelector configuration used in the Shim resource above&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>kubectl label node --all &lt;span style="color:#ebbcba">spin&lt;/span>&lt;span style="color:#908caa">=&lt;/span>&lt;span style="color:#ebbcba">true&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>此时你应该能看到一个 &lt;code>wasmtime-spin-v2&lt;/code> RuntimeClass，并且所有打过标签的节点都已准备好运行 Spin 应用。&lt;/p></description></item><item><title>在 Linode Kubernetes Engine（LKE）上安装</title><link>/zh-cn/docs/install/linode-kubernetes-engine/</link><pubDate>Tue, 23 Jul 2024 00:00:00 +0000</pubDate><guid>/zh-cn/docs/install/linode-kubernetes-engine/</guid><description>&lt;p>本指南将逐步介绍如何在 Linode Kubernetes Engine（LKE）上安装和配置 SpinKube。&lt;/p>
&lt;h2 id="前置条件">前置条件&lt;a class="td-heading-self-link" href="#%e5%89%8d%e7%bd%ae%e6%9d%a1%e4%bb%b6" aria-label="Heading self-link">&lt;/a>&lt;/h2>
&lt;p>本指南假设你已拥有一个 &lt;a href="https://login.linode.com/">Akamai Linode&lt;/a> 账户，该账户已完成配置，
并具有创建新 LKE 集群的足够权限。&lt;/p>
&lt;p>你还需要在系统上安装较新版本的 &lt;code>kubectl&lt;/code> 和 &lt;code>helm&lt;/code>。&lt;/p>
&lt;h2 id="创建-lke-集群">创建 LKE 集群&lt;a class="td-heading-self-link" href="#%e5%88%9b%e5%bb%ba-lke-%e9%9b%86%e7%be%a4" aria-label="Heading self-link">&lt;/a>&lt;/h2>
&lt;p>LKE 的控制平面是托管的，因此你只需要创建工作节点池。在本教程中，我们将使用最小可用的
工作节点创建一个 2 节点的 LKE 集群。对于安装 SpinKube 并运行大约 100 个以内的 Spin 应用来说，
这已经足够了。&lt;/p>
&lt;p>如果你计划将容器与 Spin 应用混合部署，可能更倾向于使用更大的集群，因为容器消耗的资源
远多于 Spin 应用。&lt;/p>
&lt;p>在 Linode 的 Web 控制台中，点击右侧导航栏中的 &lt;code>Kubernetes&lt;/code>，然后点击 &lt;code>Create Cluster&lt;/code>。&lt;/p>
&lt;p>&lt;img alt="下文所述的 LKE 创建界面" src="../lke-spinkube-create.png">&lt;/p>
&lt;p>在这个界面上你只需做少量选择。以下是我们所做的配置：&lt;/p>
&lt;ul>
&lt;li>&lt;strong>集群名称&lt;/strong>：我们将集群命名为 &lt;code>spinkube-lke-1&lt;/code>。你可以按照自己喜欢的命名规范来命名。&lt;/li>
&lt;li>&lt;strong>区域&lt;/strong>：我们选择了 &lt;code>Chicago, IL (us-ord)&lt;/code> 区域，但你可以选择任意你喜欢的区域。&lt;/li>
&lt;li>&lt;strong>Kubernetes 版本&lt;/strong>：最新受支持的 Kubernetes 版本是 &lt;code>1.30&lt;/code>，所以我们选择了该版本。&lt;/li>
&lt;li>&lt;strong>高可用控制平面&lt;/strong>：对于这个用于测试的集群，我们在 &lt;code>HA Control Plane&lt;/code> 上选择了 &lt;code>No&lt;/code>，
因为我们不需要高可用。&lt;/li>
&lt;li>&lt;strong>节点池配置&lt;/strong>：在 &lt;code>Add Node Pools&lt;/code> 中，我们添加了两个 &lt;code>Dedicated 4 GB&lt;/code> 节点，仅仅是为了
展示一个运行多个节点的集群。对于 Spin 应用来说，两个节点已经足够，不过你可能更倾向于
传统的 3 节点集群。点击 &lt;code>Add&lt;/code> 添加这些节点，并忽略关于最小规格的警告。&lt;/li>
&lt;/ul>
&lt;p>设置完成后，点击 &lt;code>Create Cluster&lt;/code>。&lt;/p></description></item><item><title>在 Microk8s 上安装</title><link>/zh-cn/docs/install/microk8s/</link><pubDate>Wed, 19 Jun 2024 00:00:00 +0000</pubDate><guid>/zh-cn/docs/install/microk8s/</guid><description>&lt;p>本指南将逐步介绍如何安装和配置 Microk8s 与 SpinKube。&lt;/p>
&lt;h2 id="前置条件">前置条件&lt;a class="td-heading-self-link" href="#%e5%89%8d%e7%bd%ae%e6%9d%a1%e4%bb%b6" aria-label="Heading self-link">&lt;/a>&lt;/h2>
&lt;p>本指南假设你使用的是 Ubuntu 24.04，并且已启用 Snap（这是默认配置）。&lt;/p>
&lt;blockquote>
&lt;p>本次安装的测试平台是一台配备 4G 内存和 2 个核心的 Akamai Edge Linode。&lt;/p>
&lt;/blockquote>
&lt;h2 id="安装-spin">安装 Spin&lt;a class="td-heading-self-link" href="#%e5%ae%89%e8%a3%85-spin" aria-label="Heading self-link">&lt;/a>&lt;/h2>
&lt;p>你需要&lt;a href="https://developer.fermyon.com/spin/quickstart">安装 Spin&lt;/a>。最简单的方式是
使用下面的一行命令获取最新版本的 Spin：&lt;/p>
&lt;div class="highlight" data-plausible="copy-quick-deploy-sample">&lt;pre tabindex="0" style="color:#e0def4;background-color:#191724;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-console" data-lang="console">&lt;span style="display:flex;">&lt;span>$ curl -fsSL https://developer.fermyon.com/downloads/install.sh &lt;span style="color:#908caa">|&lt;/span> bash
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>通常，接下来你需要把 &lt;code>spin&lt;/code> 移动到 &lt;code>/usr/local/bin&lt;/code> 或 &lt;code>$PATH&lt;/code> 上的其他位置：&lt;/p>
&lt;div class="highlight" data-plausible="copy-quick-deploy-sample">&lt;pre tabindex="0" style="color:#e0def4;background-color:#191724;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-console" data-lang="console">&lt;span style="display:flex;">&lt;span>$ sudo mv spin /usr/local/bin/spin
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>你可以用 &lt;code>which spin&lt;/code> 来测试它是否在 &lt;code>$PATH&lt;/code> 上。如果返回为空，你就需要调整
&lt;code>$PATH&lt;/code> 变量，或者把 Spin 放到已在 &lt;code>$PATH&lt;/code> 上的某个位置。&lt;/p>
&lt;h2 id="一个完成这些操作的脚本">一个完成这些操作的脚本&lt;a class="td-heading-self-link" href="#%e4%b8%80%e4%b8%aa%e5%ae%8c%e6%88%90%e8%bf%99%e4%ba%9b%e6%93%8d%e4%bd%9c%e7%9a%84%e8%84%9a%e6%9c%ac" aria-label="Heading self-link">&lt;/a>&lt;/h2>
&lt;p>如果你更愿意使用 shell 脚本，可以看看&lt;a href="https://gist.github.com/kate-goldenring/47950ccb30be2fa0180e276e82ac3593#file-spinkube-on-microk8s-sh">这个
Gist&lt;/a>，
它是很好的起点。它会安装 Microk8s 和 SpinKube，并对两者进行配置。&lt;/p>
&lt;h2 id="在-ubuntu-上安装-microk8s">在 Ubuntu 上安装 Microk8s&lt;a class="td-heading-self-link" href="#%e5%9c%a8-ubuntu-%e4%b8%8a%e5%ae%89%e8%a3%85-microk8s" aria-label="Heading self-link">&lt;/a>&lt;/h2>
&lt;p>使用 &lt;code>snap&lt;/code> 安装 microk8s：&lt;/p></description></item></channel></rss>