Skip to content

Commit ce2a8bc

Browse files
DavidBuzatu-Marianustiugov
authored andcommitted
Added guide for using stargz in single-node cluster
Signed-off-by: davidbuzatu-marian <[email protected]>
1 parent fcadca8 commit ce2a8bc

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

docs/stargz/stargz_guide.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Running stargz-based containers with Knative
2+
3+
This guide describes how to run stargz images on a single-cluster node using Knative's CLI.
4+
5+
## Creating stargz images
6+
[eStargz](https://github.com/containerd/stargz-snapshotter/tree/cmd/v0.12.1) is a lazily-pullable image format developed to improve the performance of container boot-ups by making better usage of the layering structure of container images. The image format is compatible to [OCI](https://github.com/opencontainers/image-spec/)/[Docker](https://github.com/moby/moby/blob/master/image/spec/v1.2.md) images, therefore it allows pushing images to standard container registries.
7+
8+
To build stargz images, we recommend following the [stargz snapshotter and stargz store guide](https://github.com/containerd/stargz-snapshotter/blob/cmd/v0.12.1/docs/INSTALL.md) and building images using the [ctr-remote](https://github.com/containerd/stargz-snapshotter/tree/cmd/v0.12.1#creating-estargz-images-using-ctr-remote) CLI tool. We recommend serving images through DockerHub.
9+
10+
## Cluster setup for stargz
11+
Execute the following below as a **non-root** user with **sudo rights** using bash:
12+
1. Setup the kubelet without firecracker and vHive with the `stock-only` and `use-stargz` flags:
13+
```bash
14+
./scripts/cloudlab/setup_node.sh stock-only use-stargz
15+
```
16+
2. Setup single node cluser:
17+
```bash
18+
./scripts/cluster/create_one_node_cluster.sh stock-only
19+
```
20+
3. Deploy the Knative service:
21+
```bash
22+
kn service apply <name> -f <yaml_config_path> --concurrency-target 1
23+
```
24+
Note: We provide an [example yaml file](../../configs/knative_workloads/stargz-node.yaml) that creates a NodeJS pod.
25+
4. Delete deployed service(s):
26+
```bash
27+
kn service delete --all
28+
```

0 commit comments

Comments
 (0)