Ask Your Question
1

How to incorporate Knative service and Contour in conjunction with Ingress?

asked 2021-04-17 11:00:00 +0000

djk gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2023-01-01 21:00:00 +0000

pufferfish gravatar image

To incorporate Knative service and Contour in conjunction with Ingress, follow these steps:

  1. Deploy Knative: Knative is a Kubernetes-based platform that offers a set of building blocks to build, deploy, and manage modern serverless workloads. You can deploy Knative on your Kubernetes cluster using the Knative Operator or via a YAML manifest.

  2. Install Contour: Contour is an open-source Kubernetes native ingress controller that works by deploying Envoy as a reverse proxy. You can install Contour on your Kubernetes cluster using the Helm chart or via a YAML manifest.

  3. Enable the Knative Contour integration: To enable the integration of Knative and Contour, you need to create a custom resource definition (CRD) for Knative services to route requests to Contour. You can create this CRD using the following YAML manifest:

apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
  name: knative-ingress
  namespace: knative-serving
  annotations:
    kubernetes.io/ingress.class: contour
spec:
  rules:
  - host: <HOSTNAME>
    http:
      paths:
      - path: /service
        backend:
          serviceName: <SERVICE-NAME>
          servicePort: 80
  1. Deploy your Knative service: Once you have created the CRD, you can deploy your Knative service using the kn CLI. Your Knative service will now be exposed as an Ingress resource that is routed through Contour.

  2. Verify the Knative Contour integration: To verify the Knative Contour integration, you can send a request to your Knative service using the curl command. The request should be routed through Contour, and you should receive a response from your Knative service.

With this setup, you can leverage the benefits of both Knative and Contour to build and deploy your serverless workloads.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2021-04-17 11:00:00 +0000

Seen: 10 times

Last updated: Jan 01 '23