Creating a Mapping between a Custom Domain Name and a Knative Service (Alpha)

    1. To map a custom domain to a Knative Service, you must first create a Knative Service.
    2. You will need a Domain Name to map, and the ability to change its DNS to point to your Knative Cluster. The details of this step are dependant on your domain registrar.

    Creating a Domain Mapping

    1. Create a new file named containing the following information.
    • namespace: The namespace that both the DomainMapping and Knative Service use.
    • (ref): The Knative Service which should be used to service requests for the custom domain name. You can also map to other targets as long as they conform to the Addressable contract and their resolved URL is of the form {name}.{namespace}.{clusterdomain} where {name} and are the name and namespace of a Kubernetes service, and {clusterdomain} is the cluster domain. Objects conforming to this contract include Knative Services and Routes, and Kubernetes Services.
    1. From the directory where the new domainmapping.yaml file was created, deploy the domain mapping by applying the file.
      1. You will also need to point the “example.org” domain name at the IP address of your Knative cluster. Details of this step differ depending on your domain registrar.