Knative Integration

Knative is a popular Kubernetes-based platform for managing serverless workloads with 3 main components:

  • Build - Source-to-container build orchestration
  • Eventing - Management and delivery of events
  • Serving - Request-driven compute that can scale to zero

We will be focusing on Knative Serving which builds on Kubernetes to support deploying and serving of serverless applications and functions.

Ambassador can watch for changes in Knative configuration in your Kubernetes cluster and set up routing accordingly.

Note: Knative was originally built with Istio handling cluster networking. This integration lets us replace Istio with Ambassador which will dramatically reduce the operational overhead of running Knative.

Getting started


  • Knative requires a Kubernetes cluster v1.11 or newer with the MutatingAdmissionWebhook admission controller enabled. kubectl v1.10 is also required. This guide assumes that you’ve already created a Kubernetes cluster which you’re comfortable installing alpha software on.

  • Ambassador should be installed in your cluster. Follow one of the installation guides for instructions on installing Ambassador.


  1. Install Knative:

    Knative is installed from remote YAML manifests. Check the Knative install documentation to install the most recent version of Knative.

    Note: You can safely ignore the no matches for kind "Gateway" in version "" warnings during the installation since we will be using Ambassador instead of the Istio gateway.

  2. Configure Ambassador to listen for Knative Services

    After Knative is installed, we need to tell Ambassador to start looking for any Knative service we create.

    This is done by setting the AMBASSADOR_KNATIVE_SUPPORT environment variable to "true" in the Ambassador deployment.

    apiVersion: apps/v1
    kind: Deployment
      name: ambassador
            - name: AMBASSADOR_NAMESPACE
                  fieldPath: metadata.namespace
              value: "true"
  1. Deploy an example Knative Service:

    Now that we have Knative installed, we can use it to build serverless applications.

    Copy the YAML below into a file called helloworld-go.yaml and apply it with kubectl

    kind: Service
      name: helloworld-go
      namespace: default
          - image:
            - name: TARGET
              value: Ambassador is Awesome!
    kubectl apply -f helloworld-go.yaml

    Knative automatically creates an Ingress/ClusterIngress resource from this Knative Service. Ambassador can then use that to register a route to the helloworld-go application.

  2. Send a request

    Knative applications are exposed via an automatically assigned Host header. By default, this Host header takes the form of {service-name}.{namespace}

    You can verify the value of the Host header of the helloworld-go Knative Service created above by grabbing the EXTERNAL-IP from the Kubernetes service

    $ kubectl get service helloworld-go
    NAME            TYPE           CLUSTER-IP   EXTERNAL-IP                         PORT(S)   AGE
    helloworld-go   ExternalName   <none>   <none>    3m

    We can now use this value and the EXTERNAL-IP of Ambassador's Kubernetes service to route to the application:

    curl -H “Host:” <ambassador IP>

We have now installed Knative with Ambassador handling traffic to our serverless applications. See the Knative documentation for more information on what else Knative can do.