docs(knative): update to newer Go and Knative versions#438
docs(knative): update to newer Go and Knative versions#438ishaanxgupta wants to merge 3 commits intourunc-dev:mainfrom
Conversation
✅ Deploy Preview for urunc ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
@cmainas please have a look and let me know if any changes are required |
f74e0c9 to
70ff35e
Compare
|
Hello @ishaanxgupta , please try to create a knative environment with your suggested changes and provide enough proof that this works. |
|
Duplicate with #433 |
|
Hi @cmainas
Test Environment
Results
|
cmainas
left a comment
There was a problem hiding this comment.
Thank you @ishaanxgupta and @hemang1404 for testing this. I have a left comment for the structure of the tutorial. I have also verified that it works. A few more notes:
- We can add an instruction to get the ingress IP. Simply transforming the note that starts with
Note: 10.244.9.220 is the IP of the kourier-internal svc.to an instruction before invoking the function - I think we can remove the
Wrapping upsection
docs/tutorials/knative.md
Outdated
| ``` | ||
|
|
||
| ### Clone urunc-enabled Knative Serving | ||
| ### Option 1: Use Pre-built Knative (Recommended) |
There was a problem hiding this comment.
This looks good, but if users decide not to build Knative, then there is no reason to installl docker, go and ko. Therefore, it would be better to move this further up before installing anything and adjusting the text.
There was a problem hiding this comment.
Also, we will need to adjust the prerequisites, to keep them as a working K8s and urunc installation and move the "Basic git, curl, kubectl, and docker installed" to the option that builds knative from scratch.
e91074f to
70ff35e
Compare
|
@cmainas made the changes as you suggested, please have a look |
|
Hey @ishaanxgupta did you also check the tutorial, by building Knative from scratch? |
2435527 to
0ee4b4b
Compare
|
any updates @ishaanxgupta and @hemang1404 on this ? |
- 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: urunc-dev#430 Signed-off-by: hemang1404 <hemangsharrma@gmail.com> Co-authored-by: ishaanxgupta <ishaankone@gmail.com>
Co-authored-by: Hemang Sharrma <hemangsharrma@gmail.com> Signed-off-by: ishaanxgupta <ishaankone@gmail.com>
Signed-off-by: Ishaan Gupta <ishaankone@gmail.com> Signed-off-by: Hemang Sharrma <hemangsharrma@gmail.com> Co-authored-by: Hemang Sharrma <hemangsharrma@gmail.com>
382f3cf to
42df884
Compare
| #### Environment Setup | ||
|
|
||
| ### Install Go 1.21 | ||
| Install [Docker](/quickstart/#install-docker), Go [[ versions.go ]], and `ko`: |
There was a problem hiding this comment.
We have already menionted about docker in the prerequisites, so why don't we add docker install link directly to it? Also its duplication (A suggestion)
There was a problem hiding this comment.
In the prerequisites, we mention a A Docker-compatible registry and docker is required due to ko (AFAIK).
| ##### Install Go (≥ 1.23) | ||
|
|
||
| ### Verify Go installation (Should be 1.21.5) | ||
| Please follow the official [Go installation instructions](https://go.dev/doc/install) to install Go 1.23 or newer. | ||
|
|
||
| ##### Verify Go installation | ||
|
|
||
| ```console | ||
| $ export GOROOT=/usr/local/go1.21/go | ||
| $ export PATH=$GOROOT/bin:$PATH | ||
| $ export PATH=/usr/local/go/bin:$PATH | ||
| $ export GOPATH=$HOME/go | ||
| $ go version | ||
| go version go1.21.5 linux/amd64 | ||
| ``` |
There was a problem hiding this comment.
We should list Go ≥ 1.23 under Prerequisites rather than documenting the full installation and verification steps. Since most developers already have Go installed if they are already using knative, it’s enough to state the required version and link to the official installation guide (https://go.dev/doc/install). This keeps the documentation clean, concise, and avoids duplicating upstream instructions.
| ##### Install ko | ||
| ```bash | ||
| export OS=Linux | ||
| export ARCH=x86_64 | ||
| curl -sSfL "https://github.com/ko-build/ko/releases/download/v${VERSION}/ko_${VERSION}_${OS}_${ARCH}.tar.gz" -o ko.tar.gz | ||
| sudo tar -zxvf ko.tar.gz -C /usr/local/bin` | ||
| curl -sSfL https://github.com/ko-build/ko/releases/latest/download/ko_Linux_x86_64.tar.gz | sudo tar xzf - -C /usr/local/bin | ||
| ko version | ||
| ``` |
There was a problem hiding this comment.
The first paragraph of the documentation already says that if we are building from source, we would need ko, so I think we should also put ko in prerequisites, and about the installation guide, I am not sure ( also confused)
There was a problem hiding this comment.
Yes, we should add ko in the prerequisites. If ko provides an installation method rather than from its releases we can point to there, otherwise we can provide the commands to fetch and install ko
|
|
||
| > 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` | ||
|
|
||
| ## Setup Networking (Kourier) |
There was a problem hiding this comment.
I think we should add a link for kourier, people can also reach their website and explore. ( A suggestion)
There was a problem hiding this comment.
I am not sure I get this one.
There was a problem hiding this comment.
I mean, adding it like this
## Setup Networking ([Kourier](https://github.com/knative-extensions/net-kourier))
| ```bash | ||
| kubectl get ksvc -A -o wide | ||
| ``` | ||
|
|
||
| Should be empty. Create an simple httpreply |
There was a problem hiding this comment.
We should remove the first step cause the user is already building from scratch, so nothing would be there. Just continue the line -> Create an simple httpreply service, based on a simple C program:
There was a problem hiding this comment.
That makes sense. Also, we do not have to mention that "Should be empty"
| ### Check Knative Service | ||
|
|
||
| ```bash | ||
| kubectl get ksvc -A -o wide | ||
| ``` |
There was a problem hiding this comment.
We can change the header to Check Knative Services are running, or we can also add the output for it
There was a problem hiding this comment.
We can add the output, the title can stay the same
| kubectl get svc -n kourier-system kourier-internal -o jsonpath='{.spec.clusterIP}' | ||
| ``` | ||
|
|
||
| Note the IP address returned (e.g., `10.244.9.220`). You'll use this in the following curl commands. |
There was a problem hiding this comment.
We can write something like this -> This command returns the internal ClusterIP (e.g., 10.244.9.220). Use this value in the next curl command (A suggestion)
There was a problem hiding this comment.
Let;s just replace "You'll use" with "Use"
|
I've added more suggestions @ishaanxgupta and @hemang1404 , what are your thoughts about them? |
|
Hello all, thank you for your comments. I just want to point out that the tutorial is still broken and we need to fix this. We can apply any other changes later, but if something is broken, we need to fix it quickly and then find ways to improve it. |
@cmainas |
| kubectl apply -f https://github.com/knative/net-kourier/releases/latest/download/kourier.yaml | ||
| kubectl patch configmap/config-network -n knative-serving --type merge -p \ | ||
| '{"data":{"ingress.class":"kourier.ingress.networking.knative.dev"}}' | ||
| kubectl patch configmap/config-domain -n knative-serving --type merge -p \ | ||
| '{"data":{"127.0.0.1.nip.io":""}}' | ||
| ``` |
There was a problem hiding this comment.
after running we can encounter this error
kubectl apply -f https://github.com/knative/net-kourier/releases/latest/download/kourier.yaml kubectl patch configmap/config-network -n knative-serving --type merge -p \ '{"data":{"ingress.class":"kourier.ingress.networking.knative.dev"}}' kubectl patch configmap/config-domain -n knative-serving --type merge -p \ '{"data":{"127.0.0.1.nip.io":""}}' namespace/kourier-system unchanged configmap/kourier-bootstrap unchanged configmap/config-kourier unchanged serviceaccount/net-kourier unchanged clusterrole.rbac.authorization.k8s.io/net-kourier unchanged clusterrolebinding.rbac.authorization.k8s.io/net-kourier unchanged deployment.apps/net-kourier-controller configured service/net-kourier-controller unchanged deployment.apps/3scale-kourier-gateway unchanged service/kourier unchanged service/kourier-internal unchanged horizontalpodautoscaler.autoscaling/3scale-kourier-gateway unchanged poddisruptionbudget.policy/3scale-kourier-gateway-pdb configured Error from server (BadRequest): Invalid JSON Patch {"data":{"ingress.class":"kourier.ingress.networking.knative.dev"}}: command not found Error from server (BadRequest): Invalid JSON Patch
Better we should go for
kubectl apply -f https://github.com/knative-extensions/net-kourier/releases/latest/download/kourier.yaml
kubectl patch configmap/config-network -n knative-serving --type merge -p '{"data":{"ingress.class":"kourier.ingress.networking.knative.dev"}}'
kubectl patch configmap/config-domain -n knative-serving --type merge -p '{"data":{"127.0.0.1.nip.io":""}}'
copy paste friendly



Description
This PR updates the Knative integration tutorial to use the latest versions and improves the documentation structure
Related issues
How was this tested?
LLM usage
GitHub Copilot assisted with code review.
Checklist
make lint).make test_ctr,make test_nerdctl,make test_docker,make test_crictl).collaborated with @hemang1404