Skip to content
This repository was archived by the owner on Nov 20, 2021. It is now read-only.

Commit 01dbfe6

Browse files
committed
Update docs
1 parent e502f32 commit 01dbfe6

File tree

1 file changed

+20
-6
lines changed

1 file changed

+20
-6
lines changed

docs/src/cinder-guide/features.md

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ More information about this Kubernetes standard can be found [here](https://gith
6666

6767

6868
```yaml
69+
# config.yaml
6970
apiVersion: cinder.crit.sh/v1alpha1
7071
kind: ClusterConfiguration
7172
featureGates:
@@ -83,12 +84,25 @@ controlPlaneConfiguration:
8384
values: ["wasm32-wasi", "wasm32-wascc"]
8485
```
8586
87+
to create a new Cinder cluster:
88+
89+
```sh
90+
❯ cinder create cluster -c config.yaml
91+
Creating cluster "cinder" ...
92+
🔥 Generating certificates
93+
🔥 Creating control-plane node
94+
🔥 Installing CNI
95+
🔥 Installing StorageClass
96+
🔥 Running post-up commands
97+
Set kubectl context to "kubernetes-admin@cinder". Prithee, be careful.
98+
```
99+
86100
*Note that node affinity is being set for `kube-proxy` to ensure it does not try to schedule a pod on either the WASI or WASCC nodes*
87101

88102
This will start two instances of Krustlet for both [WASI](https://wasi.dev/) and [waSCC](https://wascc.dev/) runtimes:
89103

90104
```sh
91-
$ kubectl get no
105+
kubectl get no
92106

93107
NAME STATUS ROLES AGE VERSION
94108
cinder Ready master 2m v1.18.5
@@ -99,8 +113,8 @@ cinder-wasi Ready <none> 1m 0.5.0
99113
With these nodes ready, we can build and push images to our local registry and run them on our Cinder cluster. For example, the [Hello World Rust for WASI](https://github.com/deislabs/krustlet/tree/master/demos/wasi/hello-world-rust) can be built using cargo and pushed to our local registry using [wasm-to-oci](https://github.com/engineerd/wasm-to-oci):
100114

101115
```sh
102-
cargo build --target wasm32-wasi --release
103-
wasm-to-oci push --use-http \
116+
cargo build --target wasm32-wasi --release
117+
wasm-to-oci push --use-http \
104118
target/wasm32-wasi/release/hello-world-rust.wasm \
105119
localhost:5000/hello-world-rust:v0.2.0
106120
```
@@ -120,13 +134,13 @@ spec:
120134
Finally, the manifest can be applied:
121135

122136
```sh
123-
kubectl apply -f k8s.yaml
137+
kubectl apply -f k8s.yaml
124138
```
125139

126140
Which will result in the pod being scheduled on the waSCC Krustlet:
127141

128142
```
129-
$ kubectl get po -A
143+
kubectl get po -A
130144
131145
NAMESPACE NAME READY STATUS RESTARTS AGE
132146
kube-system cilium-operator-657978fb5b-frrxj 1/1 Running 0 8m4s
@@ -143,7 +157,7 @@ local-path-storage local-path-storage-74cd8967f5-vv2mb 1/1 Running
143157
And should produce the following log output:
144158

145159
```sh
146-
$ kubectl logs hello-world-wasi-rust
160+
kubectl logs hello-world-wasi-rust
147161

148162
hello from stdout!
149163
hello from stderr!

0 commit comments

Comments
 (0)