Knative

https://github.com/dewitt/knative-docs/blob/master/install/Knative-with-GKE.md

Install Knative on GKE

https://github.com/dewitt/knative-docs/blob/master/install/Knative-with-GKE.md

Install Knative on minikube

$ minikube start
* minikube v1.17.1 on Arch 20.2.1
  - MINIKUBE_IN_STYLE=false
* Using the docker driver based on user configuration
* Starting control plane node minikube in cluster minikube
* Pulling base image ...
* Creating docker container (CPUs=2, Memory=4900MB) ...
* Preparing Kubernetes v1.20.2 on Docker 20.10.2 ...
  - Generating certificates and keys ...
  - Booting up control plane ...
  - Configuring RBAC rules ...
* Verifying Kubernetes components...
* Enabled addons: storage-provisioner, default-storageclass
* Done! kubectl is now configured to use "minikube" cluster and "default" namespace by default
$ minikube addons enable registry
* Verifying registry addon...
* The 'registry' addon is enabled

Install the CRDs

$ kubectl apply \
  --filename https://github.com/knative/serving/releases/download/v0.20.0/serving-crds.yaml \
  --filename https://github.com/knative/eventing/releases/download/v0.20.1/eventing-crds.yaml

Install Knative Serving

kubectl apply \
  --filename \
  https://github.com/knative/serving/releases/download/v0.20.0/serving-core.yaml

Wait for the Knative Serving deployment to complete:

kubectl rollout status deploy controller -n knative-serving
kubectl rollout status deploy activator -n knative-serving
kubectl rollout status deploy autoscaler -n knative-serving
kubectl rollout status deploy webhook -n knative-serving

Install Kourier Ingress Gateway

kubectl apply \
  --filename \
    https://github.com/knative/net-kourier/releases/download/v0.20.0/kourier.yaml

Wait for the Ingress Gateway deployment to complete:

kubectl rollout status deploy 3scale-kourier-control -n knative-serving
kubectl rollout status deploy 3scale-kourier-gateway -n kourier-system

Now configure Knative serving to use Kourier as the ingress:

kubectl patch configmap/config-network \
  -n knative-serving \
  --type merge \
  -p '{"data":{"ingress.class":"kourier.ingress.networking.knative.dev"}}'

Install and Configure Ingress Controller

kubectl apply \
  --filename https://projectcontour.io/quickstart/contour.yaml

Wait for the Ingress to be deployed and running:

kubectl rollout status ds envoy -n projectcontour
kubectl rollout status deploy contour -n projectcontour

Now create an Ingress to Kourier Ingress Gateway:

cat <<EOF | kubectl apply -n kourier-system -f -
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: kourier-ingress
  namespace: kourier-system
spec:
  rules:
  - http:
     paths:
       - path: /
         pathType: Prefix
         backend:
           service:
             name: kourier
             port:
               number: 80
EOF

Configure Knative to use the kourier-ingress Gateway:

ksvc_domain="\"data\":{\""$(minikube ip)".nip.io\": \"\"}"
kubectl patch configmap/config-domain \
    -n knative-serving \
    --type merge \
    -p "{$ksvc_domain}"

Install Knative Eventing

kubectl apply \
  --filename \
  https://github.com/knative/eventing/releases/download/v0.20.1/eventing-core.yaml \
  --filename \
  https://github.com/knative/eventing/releases/download/v0.20.1/in-memory-channel.yaml \
  --filename \
  https://github.com/knative/eventing/releases/download/v0.20.1/mt-channel-broker.yaml

Like Knative Serving deployment, Knative Eventing deployment will also take few minutes to complete, check the status of the deployment using:

kubectl rollout status deploy eventing-controller -n knative-eventing
kubectl rollout status deploy eventing-webhook  -n knative-eventing
kubectl rollout status deploy imc-controller  -n knative-eventing
kubectl rollout status deploy imc-dispatcher -n knative-eventing
kubectl rollout status deploy mt-broker-controller -n knative-eventing
kubectl rollout status deploy mt-broker-filter -n knative-eventing
kubectl rollout status deploy mt-broker-filter -n knative-eventing

Install Knative Client

wget -O ~/.local/bin/kn \
  https://github.com/knative/client/releases/download/v0.20.0/kn-linux-amd64 \
&& chmod ug+x ~/.local/bin/kn