The Blog

 

Following my mantra to automate everything that comes my way, I set out to automate the installation of Knative onto the IBM Cloud Kubernetes Service using the Open Toolchain on IBM Cloud.

In summary, Knative allows you to run your containers on Kubernetes only when they get requests. When they are not used anymore, they are terminated and make room for other workloads. For more information on Knative, read the documentation here. In addition, what I find refreshing is that with Knative we are lifting the conversation from orchestrating services and traffic between them, to orchestrating complete applications.

Now back to automation.

Initially I followed the step-by-step instructions I came across in Jason McGee’s blog and found Niklas Heidloff’s blog helpful as well.

But then I thought, wouldn’t it be even more engaging if we could get developers to experiment with Knative itself – not only with its installation – with just a click of a button?

Leveraging the Open Toolchain service on IBM Cloud, you can now use the button below to kickoff the end-to-end installation process and interact with a simple Knative application within 30 minutes. Most of these 30 minutes is consumed by the IBM Kuberenetes Service provisioning.

The toolchain will create a new cluster, install Istio and Knative Serving. It will also deploy a Helm chart of a simple Knative application that you can interact with.

Once the installation and setup is complete, follow these steps to interact with the Knative application:

  1. Retrieve the external IP address of Knative:
    export IP_ADDRESS=$(kubectl get svc knative-ingressgateway -n istio-system -o 'jsonpath={.status.loadBalancer.ingress[0].ip}')
  2. Retrieve the host URL – domain that identifies the Knative application:
    export HOST_URL=$(kubectl get services.serving.knative.dev start-with-knative -o jsonpath='{.status.domain}')
  3. Interact with the application as such:
    curl -H "Host: ${HOST_URL}" http://${IP_ADDRESS}

Now you’re ready to experiment with your own Knative application. Check out the Knative documentation and get started.

Go ahead! Click the button to get started.

For a full description of the toolchain read The start-with-knative Toolchain.

And while you’re there, you can learn about the Open Toolchain as well through this example. More information is available here.