Installing Knative
Let’s install Knative on your Kubernetes cluster. We’ll install the Knative Serving component and configure networking.
Step 1: Install Knative Serving
First, install the Knative Serving component:
kubectl apply -f https://github.com/knative/serving/releases/download/knative-v1.12.0/serving-crds.yamlkubectl apply -f https://github.com/knative/serving/releases/download/knative-v1.12.0/serving-core.yamlStep 2: Install a Networking Layer
Knative requires a networking layer. We’ll use Kourier:
kubectl apply -f https://github.com/knative/net-kourier/releases/download/knative-v1.12.0/kourier.yamlConfigure Knative to use Kourier:
kubectl patch configmap/config-network \ --namespace knative-serving \ --type merge \ --patch '{"data":{"ingress-class":"kourier.ingress.networking.knative.dev"}}'Step 3: Configure DNS
For local development, configure Magic DNS:
kubectl apply -f https://github.com/knative/serving/releases/download/knative-v1.12.0/serving-default-domain.yamlVerify Installation
Check that all Knative components are running:
kubectl get pods -n knative-servingYou should see all pods in Running status.
Next Steps
Now that Knative is installed, let’s deploy your first service!