DEV Community

Cover image for Install Knative in Civo Kubernetes (v1.20.2+k3s1)
Seski Ramadhan
Seski Ramadhan

Posted on

Install Knative in Civo Kubernetes (v1.20.2+k3s1)

Hi gangs, today we will learn how to Install Knative in Civo Kubernetes.

This tutorial still uses the old version of Kubernetes, use command below to create the cluster

civo kubernetes create kube-demo -v 1.20.2-k3s1 --wait
Enter fullscreen mode Exit fullscreen mode

Let's clone the repo below

git clone https://github.com/ludesdeveloper/civo-knative.git
Enter fullscreen mode Exit fullscreen mode

Change directory to civo-knative

cd civo-knative
Enter fullscreen mode Exit fullscreen mode

Run install-knative.sh script

./install-knative.sh
Enter fullscreen mode Exit fullscreen mode

You can take a look detailed code in that script, what I want to mention is the kubectl delete svc traefik -n kube-system command in the script. After a few tries, I can not make istio-ingressgateway to get external-ip, so I decide to remove traefik, and it works, istio-ingressgateway get its external-ip.

Now Let's take a look at our cluster.

Image description

Image description
Everything looks good :)

Now lets we apply some example

kubectl apply -f autoscaling-service-example.yaml
Enter fullscreen mode Exit fullscreen mode

Image description

As you can see, now we have Replicasets pods are ready.

Let's test our serverless load, but first, we need to install hey load generator

go get -u github.com/rakyll/hey
Enter fullscreen mode Exit fullscreen mode

Image description
Run script below for testing

./auto-scaling-testing.sh
Enter fullscreen mode Exit fullscreen mode

Image description

As you can see, pods are created when we try to test. Then what we need to do is wait until pods are disappearing.

Image description

After a few seconds, we can see that pods have now disappeared. We also can see the output of hey

Image description

Top comments (0)