
What is Knative ?
Knative is an open-source enterprise-level solution to build serverless and event driven applications. It is platform agnostic solution. To know more about Knative visit this blog https://blog.nashtechglobal.com/what-is-knative
Apart from installing Knative with Yaml files k native also provides kubernetes operator to install configure and manage in knative in cluster. To see the supported version of eventing and serving components use this table .
Prerequisites for installing Knative
- For production purpose it is required to have :
- You need at least 6 CPUs, 6 GB of memory, and 30 GB of disk storage if you have only one node in your cluster.
- In case of multiple nodes , for each node you need at least 2 CPUs, 4 GB of memory, and 20 GB of disk storage
- Kubernetes v1.27 or newer is required.
- kubectl ClI should be installed
Verify CLI Binaries
Download the files you want, and the checksums.txt, checksum.txt.pem, and checksums.txt.sig files from the releases page, by running the following commands:
wget https://github.com/knative/client/releases/download/<kn-version>/checksums.txt
wget https://github.com/knative/client/releases/download/<kn-version>/kn-darwin-amd64
wget https://github.com/knative/client/releases/download/<kn-version>/checksums.txt.sig
wget https://github.com/knative/client/releases/download/<kn-version>/checksums.txt.pem
Where <kn-version> is the version of the CLI that you want to verify. For example, knative-v1.8.0.
- Verify the signature by running the command:
cosign verify-blob \
--cert checksums.txt.pem \
--signature checksums.txt.sig \
--certificate-identity signer@knative-releases.iam.gserviceaccount.com \
--certificate-oidc-issuer=https://accounts.google.com \
checksums.txt
- Once you’ve confirmed the signature is valid, you can proceed to verify that the SHA256 sums of the downloaded binary match by executing the following command:
sha256sum --ignore-missing -c checksums.txt
Install the Knative Operator CLI Plugin
Before you install the Knative Operator CLI Plugin, first install the Knative CLI.
- Download the binary
kn-operator-linux-amd64for your system from the release page. - Rename the binary to
kn-operator:mv kn-operator-linux-amd64 kn-operator
- Make the plugin executable by running the command:
chmod +x kn-operator
- Create the directory for the
knplugin:
mkdir -p ~/.config/kn/plugins
- Move the file to a plugin directory for
kn:
cp kn-operator ~/.config/kn/plugins
Install the Knative Operator
You have the flexibility to install the Knative Operator of a specific version in any chosen namespace. The default namespace is “default,” and the default version is the latest available.
Install the latest version of Knative Operator:
kn operator install
To install Knative Operator under a certain namespace, e.g. knative-operator, run:
kn operator install -n knative-operator
To install Knative Operator of a specific version, e.g. 1.7.1, run:
kn operator install -v 1.7.1
Installing the Knative Serving component
You can install Knative Serving of any specific version under any specific namespace. By default, the namespace is knative-serving, and the version is the latest.
Install Knative Serving using following command :
kn operator install --component serving
To install Knative Serving under a certain namespace, e.g. knative-serving, run:
kn operator install --component serving -n knative-serving
To install the ingress plugin, e.g Kourier, together with the install command, run:
kn operator install --component serving -n knative-serving -v "1.7" --kourier
If you do not specify the ingress plugin, istio is used as the default. However, you need to make sure you install Istio first.
Install the networking layer
You can configure the network layer option via the Operator CLI Plugin. Click on each of the following tabs to see how you can configure Knative Serving with different ingresses.
The following steps install Kourier and enable its Knative integration:
- To configure Knative Serving to use Kourier, run the command as follows:
kn operator enable ingress --kourier -n knative-serving
Installing the Knative Eventing component
You can install Knative Eventing of any specific version under any specific namespace. By default, the namespace is knative-eventing, and the version is the latest.
You can install Knative Eventing by using following command:
kn operator install --component eventing
To install Knative Eventing under a certain namespace, e.g. knative-eventing, run:
kn operator install --component eventing -n knative-eventing
To install Knative Operator of a specific version, e.g. 1.7, run:
kn operator install --component eventing -n knative-eventing -v "1.7"
Installing Knative Eventing with event sources¶\
Knative Operator allows you to configure the Knative Eventing component with various event sources. Click on each of the tabs below to explore how you can configure Knative Eventing with different event sources:
- To install the eventing source Github, run the following command:
kn operator enable eventing-source --github --namespace knative-eventing
This is all for this part of the blog . To know more about Knative you can go through Nashtech blogs .
References :
- https://knative.dev/docs/install/
- https://knative.dev/docs/client/install-kn/
- https://knative.dev/docs/client/configure-kn/
- https://knative.dev/docs/install/