Skip to content

Commit 668ef69

Browse files
Merge pull request #305 from kate-goldenring/update-rancher-desktop-steps
Update Rancher Desktop install instructions to use latest release and Spin version
2 parents a7a5852 + 8fb7503 commit 668ef69

File tree

3 files changed

+30
-48
lines changed

3 files changed

+30
-48
lines changed
Binary file not shown.
Binary file not shown.

content/en/docs/install/rancher-desktop.md

Lines changed: 30 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -21,36 +21,29 @@ essentials to work with containers and Kubernetes on your desktop.
2121

2222
1. **Download Rancher Desktop**:
2323
- Navigate to the [Rancher Desktop releases
24-
page](https://github.com/rancher-sandbox/rancher-desktop/releases/tag/v1.14.0).
25-
- Select the appropriate installer for your operating system for version 1.14.0.
24+
page](https://github.com/rancher-sandbox/rancher-desktop/releases). We tested this documentation with Rancher Desktop `1.19.1` with Spin `v3.2.0`, but it should work with more recent versions.
25+
- Select the appropriate installer for your operating system.
2626
2. **Install Rancher Desktop**:
2727
- Run the downloaded installer and follow the on-screen instructions to complete the
2828
installation.
2929

3030
### Step 2: Configure Rancher Desktop
3131

32-
- Open Rancher Desktop.
33-
- Navigate to the **Preferences** -> **Kubernetes** menu.
34-
- Ensure that the **Enable** **Kubernetes** is selected and that the **Enable Traefik** and
35-
**Install Spin Operator** Options are checked. Make sure to **Apply** your changes.
36-
37-
![Rancher Desktop](../rancher-desktop-kubernetes.png)
32+
- Open Rancher Desktop
33+
- Configure `containerd` as your container runtime engine (under **Preferences** -> **Container Engine**).
34+
- Make sure that the Enable Wasm option is checked in the **Preferences****Container Engine**
35+
section. Remember to always apply your changes.
3836

39-
- Make sure to select `rancher-desktop` from the `Kubernetes Contexts` configuration in your
40-
toolbar.
41-
42-
![Kubernetes contexts](../rancher-desktop-contexts.png)
37+
![Rancher preferences](../rancher-desktop-preferences.png)
4338

44-
- Make sure that the Enable Wasm option is checked in the **Preferences** **Container Engine
45-
section**. Remember to always apply your changes.
39+
- Navigate to the **Preferences** -> **Kubernetes** menu.
40+
- Enable Kubernetes, Traefik and Spin Operator (under **Preferences** -> **Kubernetes** ensure that the **Enable Kubernetes**, **Enable Traefik** and **Install Spin Operator** options are checked.)
4641

47-
![Rancher preferences](../rancher-desktop-preferences.png)
42+
![Rancher Desktop](../rancher-desktop-kubernetes.png)
4843

49-
- Once your changes have been applied, go to the **Cluster Dashboard****More Resources**
50-
**Cert Manager** section and click on **Certificates**. You will see the
51-
`spin-operator-serving-cert` is ready.
44+
- Make sure to select `rancher-desktop` from your Kubernetes contexts: `kubectl config use-context rancher-desktop`
5245

53-
![Certificates tab](../rancher-desktop-certificates.png)
46+
- Once your changes have been applied, go to the **Cluster Dashboard** -> **Workloads**. You should see the `spin-operator-controller-manager` deployed to the `spin-operator` namespace.
5447

5548
### Step 3: Creating a Spin Application
5649

@@ -62,17 +55,21 @@ essentials to work with containers and Kubernetes on your desktop.
6255
$ spin new -t http-js hello-k3s --accept-defaults
6356
$ cd hello-k3s
6457
```
65-
3. We can edit the `/src/index.js` file and make the workload return a string "Hello from Rancher
66-
Desktop":
58+
59+
3. We can edit the `/src/index.js` file and make the workload return a string "Hello from Rancher Desktop":
6760

6861
```javascript
69-
export async function handleRequest(request) {
70-
return {
71-
status: 200,
72-
headers: {"content-type": "text/plain"},
73-
body: "Hello from Rancher Desktop" // <-- This changed
74-
}
75-
}
62+
import { AutoRouter } from 'itty-router';
63+
64+
let router = AutoRouter();
65+
66+
router
67+
.get("/", () => new Response("Hello from Rancher Desktop")) // <-- this changed
68+
.get('/hello/:name', ({ name }) => `Hello, ${name}!`)
69+
70+
addEventListener('fetch', (event) => {
71+
event.respondWith(router.fetch(event.request));
72+
});
7673
```
7774

7875
### Step 4: Deploying Your Application
@@ -87,30 +84,15 @@ $ spin registry push ttl.sh/hello-k3s:0.1.0
8784

8885
Replace `ttl.sh/hello-k3s:0.1.0` with your registry URL and tag.
8986

90-
2. **Scaffold Kubernetes resources**:
91-
92-
```bash
93-
$ spin kube scaffold --from ttl.sh/hello-k3s:0.1.0
94-
95-
apiVersion: core.spinkube.dev/v1alpha1
96-
kind: SpinApp
97-
metadata:
98-
name: hello-k3s
99-
spec:
100-
image: "ttl.sh/hello-k3s:0.1.0"
101-
executor: containerd-shim-spin
102-
replicas: 2
103-
```
87+
2. **Deploy your Spin application to the cluster**:
10488

105-
This command prepares the necessary Kubernetes deployment configurations.
89+
Use the [`spin-kube` plugin](https://github.com/spinframework/spin-plugin-kube) to deploy your application to the cluster
10690

107-
3. **Deploy the application to Kubernetes**:
108-
109-
```bash
110-
$ spin kube deploy --from ttl.sh/hello-k3s:0.1.0
91+
```sh
92+
spin kube scaffold --from ttl.sh/hello-k3s:0.1.0 | kubectl apply -f -
11193
```
11294

113-
If we click on the Rancher Desktop’s “Cluster Dashboard”, we can see hello-k3s:0.1.0 running inside
95+
If we click on the Rancher Desktop’s “Cluster Dashboard”, we can see `hello-k3s` is running inside
11496
the “Workloads” dropdown section:
11597

11698
![Rancher Desktop Preferences Wasm](../rancher-desktop-cluster.png)

0 commit comments

Comments
 (0)