Skip to content

Commit 70ff35e

Browse files
docs(knative): update to newer Go and Knative versions
- Update Go version from 1.21.5 to use dynamic [[ versions.go ]] template (currently 1.24.6) - Update Knative version to use [[ versions.knative ]] template (currently 1.17.0) - Restructure installation to prioritize pre-built binaries (Option 1) - Simplify Go and ko installation instructions - Add ko version verification step - Improve clarity of pre-built vs source build options Fixes: #430 Signed-off-by: hemang1404 <hemangsharrma@gmail.com> Co-authored-by: ishaanxgupta <ishaankone@gmail.com>
1 parent e2000cf commit 70ff35e

File tree

1 file changed

+35
-30
lines changed

1 file changed

+35
-30
lines changed

docs/tutorials/knative.md

Lines changed: 35 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# Knative + urunc: Deploying Serverless Unikernels
22

33
This guide walks you through deploying [Knative Serving](https://knative.dev/)
4-
using [`urunc`](https://github.com/urunc-dev/urunc). You’ll build Knative from
5-
a custom branch and use [`ko`](https://github.com/ko-build/ko) for seamless
6-
image building and deployment.
4+
with urunc support on Kubernetes. We provide pre-built binaries for quick setup,
5+
or you can build Knative from source using [`ko`](https://github.com/ko-build/ko)
6+
for custom configurations.
77

88
## Prerequisites
99

@@ -14,62 +14,67 @@ image building and deployment.
1414

1515
## Environment Setup
1616

17-
Install [Docker](/quickstart/#install-docker), Go >= 1.21, and `ko`:
17+
Install [Docker](/quickstart/#install-docker), Go [[ versions.go ]], and `ko`:
1818

19-
### Install Go 1.21
19+
### Install Go [[ versions.go ]]
2020
```bash
21-
sudo mkdir /usr/local/go1.21
22-
wget https://go.dev/dl/go1.21.5.linux-amd64.tar.gz
23-
sudo tar -zxvf go1.21.5.linux-amd64.tar.gz -C /usr/local/go1.21/
24-
rm go1.21.5.linux-amd64.tar.gz
21+
wget https://go.dev/dl/go[[ versions.go ]].linux-amd64.tar.gz
22+
sudo rm -rf /usr/local/go
23+
sudo tar -zxvf go[[ versions.go ]].linux-amd64.tar.gz -C /usr/local/
24+
rm go[[ versions.go ]].linux-amd64.tar.gz
2525
```
2626

27-
### Verify Go installation (Should be 1.21.5)
27+
### Verify Go installation (Should be [[ versions.go ]])
2828

2929
```console
30-
$ export GOROOT=/usr/local/go1.21/go
31-
$ export PATH=$GOROOT/bin:$PATH
30+
$ export PATH=/usr/local/go/bin:$PATH
3231
$ export GOPATH=$HOME/go
3332
$ go version
34-
go version go1.21.5 linux/amd64
33+
go version go[[ versions.go ]] linux/amd64
3534
```
3635

37-
### Install ko VERSION=0.15.1
36+
### Install ko (latest)
3837
```bash
39-
export OS=Linux
40-
export ARCH=x86_64
41-
curl -sSfL "https://github.com/ko-build/ko/releases/download/v${VERSION}/ko_${VERSION}_${OS}_${ARCH}.tar.gz" -o ko.tar.gz
42-
sudo tar -zxvf ko.tar.gz -C /usr/local/bin`
38+
curl -sSfL https://github.com/ko-build/ko/releases/latest/download/ko_Linux_x86_64.tar.gz | sudo tar xzf - -C /usr/local/bin
39+
ko version
4340
```
4441

4542
## Clone and Build Knative with the queue-proxy patch
4643

4744
### Set your container registry
4845

49-
> Note: You should be able to use dockerhub for this. e.g. `<yourdockerhubid>/knative`
46+
> Note: You should be able to use Docker Hub for this. e.g. `<yourdockerhubid>/knative`
5047
5148
```bash
52-
export KO_DOCKER_REPO='harbor.nbfc.io/nubificus/knative-install-urunc'
49+
export KO_DOCKER_REPO='<your-registry>/knative'
5350
```
5451

55-
### Clone urunc-enabled Knative Serving
52+
### Option 1: Use Pre-built Knative (Recommended)
53+
54+
The quickest way to get started is to use our pre-built Knative binaries with urunc support:
55+
5656
```bash
57-
git clone https://github.com/nubificus/serving -b feat_urunc
58-
cd serving/
59-
ko resolve -Rf ./config/core/ > knative-custom.yaml
57+
kubectl apply -f https://s3.nbfc.io/knative/knative-v[[ versions.knative ]]-urunc-5220308.yaml
6058
```
6159

62-
### Apply knative's manifests to the local k8s
60+
If the manifest is too large and kubectl fails, try again or use:
6361
```bash
64-
kubectl apply -f knative-custom.yaml
62+
kubectl create -f https://s3.nbfc.io/knative/knative-v[[ versions.knative ]]-urunc-5220308.yaml
6563
```
6664

67-
Alternatively, you could use our latest build:
65+
### Option 2: Build Knative from Source
66+
67+
If you need to build Knative with custom modifications using urunc support:
68+
6869
```bash
69-
kubectl apply -f https://s3.nbfc.io/knative/knative-v[[ versions.knative ]]-urunc-5220308.yaml
70-
```
70+
# Clone urunc-enabled Knative Serving with urunc patches
71+
git clone https://github.com/nubificus/serving -b feat_urunc
72+
cd serving/
7173

72-
> Note: There are cases where due to the large manifests, kubectl fails. Try a second time, or use `kubectl create -f https://s3.nbfc.io/knative/knative-v[[ versions.knative ]]-urunc-5220308.yaml`
74+
# Build and deploy
75+
ko resolve -Rf ./config/core/ > knative-custom.yaml
76+
kubectl apply -f knative-custom.yaml
77+
```
7378

7479
## Setup Networking (Kourier)
7580

0 commit comments

Comments
 (0)