You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<pclass="lead mt-5">A new open source project that streamlines the experience of developing, deploying, and operating Wasm workloads on Kubernetes.</p>
10
9
{{< blocks/link-down color="info" >}}
11
10
{{< /blocks/cover >}}
@@ -15,32 +14,48 @@ title: SpinKube
15
14
16
15
SpinKube comprises the following open source projects.
17
16
18
-
<br />
19
-
<br />
17
+
<br /> <br />
20
18
21
19
<u>**Containerd Shim Spin**</u>
22
20
23
-
The [Containerd Shim Spin repository](https://github.com/spinkube/containerd-shim-spin) provides shim implementations for running WebAssembly ([Wasm](https://webassembly.org/)) / Wasm System Interface ([WASI](https://github.com/WebAssembly/WASI)) workloads using [runwasi](https://github.com/deislabs/runwasi) as a library, whereby workloads built using the [Spin framework](https://github.com/fermyon/spin) can function similarly to container workloads in a Kubernetes environment.
21
+
The [Containerd Shim Spin repository](https://github.com/spinkube/containerd-shim-spin) provides
22
+
shim implementations for running WebAssembly ([Wasm](https://webassembly.org/)) / Wasm System
23
+
Interface ([WASI](https://github.com/WebAssembly/WASI)) workloads using
24
+
[runwasi](https://github.com/deislabs/runwasi) as a library, whereby workloads built using the [Spin
25
+
framework](https://github.com/fermyon/spin) can function similarly to container workloads in a
26
+
Kubernetes environment.
24
27
25
-
<br />
26
-
<br />
28
+
<br /> <br />
27
29
28
30
<u>**Runtime Class Manager**</u>
29
31
30
-
The [Runtime Class Manager, also known as the Containerd Shim Lifecycle Operator](https://github.com/spinkube/runtime-class-manager), is designed to automate and manage the lifecycle of containerd shims in a Kubernetes environment. This includes tasks like installation, update, removal, and configuration of shims, reducing manual errors and improving reliability in managing WebAssembly (Wasm) workloads and other containerd extensions.
32
+
The [Runtime Class Manager, also known as the Containerd Shim Lifecycle
33
+
Operator](https://github.com/spinkube/runtime-class-manager), is designed to automate and manage the
34
+
lifecycle of containerd shims in a Kubernetes environment. This includes tasks like installation,
35
+
update, removal, and configuration of shims, reducing manual errors and improving reliability in
36
+
managing WebAssembly (Wasm) workloads and other containerd extensions.
31
37
32
-
<br />
33
-
<br />
38
+
<br /> <br />
34
39
35
40
<u>**Spin Plugin for Kubernetes**</u>
36
41
37
-
The [Spin plugin for Kubernetes](https://github.com/spinkube/spin-plugin-kube), known as `spin kube`, faciliates the translation of existing [Spin applications](https://developer.fermyon.com/spin) into the Kubernetes custom resource that will be deployed and managed on your cluster. This plugin works by taking your spin application manifest and scaffolding it into a Kubernetes yaml, which can be deployed and managed with `kubectl`. This allows Kubernetes to manage and run Wasm workloads in a way similar to traditional container workloads.
42
+
The [Spin plugin for Kubernetes](https://github.com/spinkube/spin-plugin-kube), known as `spin
43
+
kube`, faciliates the translation of existing [Spin
44
+
applications](https://developer.fermyon.com/spin) into the Kubernetes custom resource that will be
45
+
deployed and managed on your cluster. This plugin works by taking your spin application manifest and
46
+
scaffolding it into a Kubernetes yaml, which can be deployed and managed with `kubectl`. This allows
47
+
Kubernetes to manage and run Wasm workloads in a way similar to traditional container workloads.
38
48
39
-
<br />
40
-
<br />
49
+
<br /> <br />
41
50
42
51
<u>**Spin Operator**</u>
43
52
44
-
The [Spin Operator](https://github.com/spinkube/spin-operator/) enables deploying Spin applications to Kubernetes. The foundation of this project is built using the [kubebuilder](https://github.com/kubernetes-sigs/kubebuilder) framework. Spin Operator defines Spin App Custom Resource Definitions (CRDs). Spin Operator watches SpinApp Custom Resources e.g. Spin app image, replicas, schedulers and other user-defined values and realizes the desired state in the Kubernetes cluster. Spin Operator introduces a host of functionality such as resource-based scaling, event-driven scaling, and much more.
53
+
The [Spin Operator](https://github.com/spinkube/spin-operator/) enables deploying Spin applications
54
+
to Kubernetes. The foundation of this project is built using the
Copy file name to clipboardExpand all lines: content/en/blog/community/spinkube-kind-rd/index.md
+49-22Lines changed: 49 additions & 22 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,9 @@ resources:
10
10
title: "Image #:counter"
11
11
---
12
12
13
-
The goal of this guide is show a way to bring [SpinKube](https://www.spinkube.dev/) to [KinD](https://kind.sigs.k8s.io/) without the need of a custom image, like the [SpinKube on k3d](https://www.spinkube.dev/docs/spin-operator/quickstart/) example.
13
+
The goal of this guide is show a way to bring [SpinKube](https://www.spinkube.dev/) to
14
+
[KinD](https://kind.sigs.k8s.io/) without the need of a custom image, like the [SpinKube on
Instead, the Rancher Desktop (RD) Spin plugin will be used alongside KinD cluster configuration.
16
18
@@ -34,26 +36,31 @@ In order to follow this guide, the following applications need to be installed:
34
36
- Kubernetes is disabled
35
37
- KinD v0.23
36
38
- This is the first version with the `nerdctl` provider
37
-
- If not yet available, you might need to build it (see [Bonus 1: build KinD](#bonus-1-build-kind))
39
+
- If not yet available, you might need to build it (see [Bonus 1: build
40
+
KinD](#bonus-1-build-kind))
38
41
39
42
Concerning the Kubernetes tooling, Rancher Desktop already covers it.
40
43
41
44
### Connecting the Dots
42
45
43
-
The reason KinD v0.23 is needed with the `nerdctl` provider is because the Spin plugin only works on Rancher Desktop when `containerd` runtime is selected, instead of `docker`.
46
+
The reason KinD v0.23 is needed with the `nerdctl` provider is because the Spin plugin only works on
47
+
Rancher Desktop when `containerd` runtime is selected, instead of `docker`.
44
48
45
-
If it's still "obscure", keep reading and hopefully it will make sense (yes, not yet spoiling how the Spin plugin will be leveraged).
49
+
If it's still "obscure", keep reading and hopefully it will make sense (yes, not yet spoiling how
50
+
the Spin plugin will be leveraged).
46
51
47
52
## KinD Configurations
48
53
49
54
This section should clarify how the Spin plugin will be leveraged.
50
55
51
56
### Containerd Configuration File
52
57
53
-
The first configuration is related to `containerd`, and more precisely, the one running inside the KinD container(s):
58
+
The first configuration is related to `containerd`, and more precisely, the one running inside the
59
+
KinD container(s):
54
60
55
61
- Create a file in your `$HOME` directory called `config.toml`
56
-
- You can create it inside a directory, however it still should be located in your `$HOME` directory
62
+
- You can create it inside a directory, however it still should be located in your `$HOME`
63
+
directory
57
64
- The location will be important when creating the KinD cluster
58
65
- Paste the following content inside the `config.toml` file:
59
66
@@ -100,20 +107,22 @@ version = 2
100
107
tolerate_missing_hugepages_controller = true
101
108
# restrict_oom_score_adj needs to be true when running inside UserNS (rootless)
> NOTE: this file is a copy of the original one that can be found inside the KinD container. The only addition to the file is the declaration of the `spin` plugin (the last 2 lines)
116
+
> NOTE: this file is a copy of the original one that can be found inside the KinD container. The
117
+
> only addition to the file is the declaration of the `spin` plugin (the last 2 lines)
110
118
111
119
### KinD Configuration File
112
120
113
121
The second configuration file is related to KinD and will be used when creating a new cluster:
114
122
115
123
- Create a file in your `$HOME` directory called `kind-spin.yaml` (for example)
116
-
- You can create it inside a directory, however it still should be located in your `$HOME` directory
124
+
- You can create it inside a directory, however it still should be located in your `$HOME`
125
+
directory
117
126
- The location will be important when creating the KinD cluster
118
127
119
128
**Windows Users ONLY**
@@ -152,15 +161,22 @@ EOF
152
161
153
162
Rancher Desktop leverages two different technologies depending on the OS its installed.
154
163
155
-
On Windows, [WSL2](https://learn.microsoft.com/en-us/windows/wsl/install) will be used and for Linux and MacOS, [Lima](https://lima-vm.io/docs/) is the preferred choice.
164
+
On Windows, [WSL2](https://learn.microsoft.com/en-us/windows/wsl/install) will be used and for Linux
165
+
and MacOS, [Lima](https://lima-vm.io/docs/) is the preferred choice.
156
166
157
-
While both technologies run Linux in a microVM, the behaviors differ in some parts. And the mountpoints with the host system are one of these differences.
167
+
While both technologies run Linux in a microVM, the behaviors differ in some parts. And the
168
+
mountpoints with the host system are one of these differences.
158
169
159
-
In the case of RD on WSL, the file generated is created **inside** the microVM, as nerdctl will need to have acceess to the file's path. Technically speaking, the mountpoint `/mnt/c` could also be used, however sometimes it's not available due to WSL main configuration. This way should be a bit more generic.
170
+
In the case of RD on WSL, the file generated is created **inside** the microVM, as nerdctl will need
171
+
to have acceess to the file's path. Technically speaking, the mountpoint `/mnt/c` could also be
172
+
used, however sometimes it's not available due to WSL main configuration. This way should be a bit
173
+
more generic.
160
174
161
-
Concerning RD on Lima, `$HOME` is mounted inside the microVM, therefore nerdctl will already see the files, and there's not need on copying the files over like it's done for WSL.
175
+
Concerning RD on Lima, `$HOME` is mounted inside the microVM, therefore nerdctl will already see the
176
+
files, and there's not need on copying the files over like it's done for WSL.
162
177
163
-
Finally, on both cases, the binary `containerd-shim-spin-v2` is already accessible inside the microVMs.
178
+
Finally, on both cases, the binary `containerd-shim-spin-v2` is already accessible inside the

192
208
193
-
Now that you have a KinD cluster running with the spin plugin enabled for `containerd`. However, it is not yet used by Kubernetes (`runtimeClass`). This will be done on the next section.
209
+
Now that you have a KinD cluster running with the spin plugin enabled for `containerd`. However, it
210
+
is not yet used by Kubernetes (`runtimeClass`). This will be done on the next section.
194
211
195
212
## Deploy SpinKube
196
213
197
-
From here, you can reference the [excellent quickstart to deploy SpinKube](https://www.spinkube.dev/docs/spin-operator/quickstart/) for a detailed explanation of each step.
214
+
From here, you can reference the [excellent quickstart to deploy
215
+
SpinKube](https://www.spinkube.dev/docs/spin-operator/quickstart/) for a detailed explanation of
216
+
each step.
198
217
199
-
To avoid repetition, and to encourage you to go read the quickstart (and the overall SpinKube docs), the steps below will only include short descriptions:
218
+
To avoid repetition, and to encourage you to go read the quickstart (and the overall SpinKube docs),
219
+
the steps below will only include short descriptions:
200
220
201
-
> **IMPORTANT:** the following commands are "universal", working on both powershell and bash/zsh. The "multiline characters" have been removed on purpose (\` for powershell and \\ for bash).
221
+
> **IMPORTANT:** the following commands are "universal", working on both powershell and bash/zsh.
222
+
> The "multiline characters" have been removed on purpose (\` for powershell and \\ for bash).
202
223
203
224
```shell
204
225
# Install cert-manager
@@ -243,13 +264,19 @@ Congratulations! You have a cluster with SpinKube running.
243
264
244
265
## Conclusion
245
266
246
-
First of all, THANK YOU to all the projects maintainers and contributors! Without you, there wouldn't be blogs like this one.
267
+
First of all, THANK YOU to all the projects maintainers and contributors! Without you, there
268
+
wouldn't be blogs like this one.
247
269
248
-
Secondly, as you may know or not, this is **highly experimental**, and the main purpose was more a proof-of-concept rather than a real solution.
270
+
Secondly, as you may know or not, this is **highly experimental**, and the main purpose was more a
271
+
proof-of-concept rather than a real solution.
249
272
250
-
Lastly, SpinKube on Rancher Desktop has been tested, both by Fermyon and SUSE, and it's suggested that you [follow this howto](https://www.spinkube.dev/docs/spin-operator/tutorials/integrating-with-rancher-desktop/) for a long-term environment.
273
+
Lastly, SpinKube on Rancher Desktop has been tested, both by Fermyon and SUSE, and it's suggested
274
+
that you [follow this
275
+
howto](https://www.spinkube.dev/docs/spin-operator/tutorials/integrating-with-rancher-desktop/) for
276
+
a long-term environment.
251
277
252
-
Special thanks to Fermyon for hosting this (first) blog on SpinKube and thanks to anyone reaching this last line, you mean the world to me.
278
+
Special thanks to Fermyon for hosting this (first) blog on SpinKube and thanks to anyone reaching
0 commit comments