Docs: Custom domains doc only explains customizing default domain

Created on 5 Nov 2019  路  8Comments  路  Source: knative/docs

https://knative.dev/docs/serving/using-a-custom-domain/

This doc is titled "Setting up a custom domain" but it actually only covers "Configuring the default domain".

It doesn't explain how can I expose my hello-go.default.example.com with a domain name I own like hello.com.

kinnetworking kinnew-docs-needed kinserving lifecyclfrozen priorit2

All 8 comments

Issues go stale after 90 days of inactivity.
Mark the issue as fresh by adding the comment /remove-lifecycle stale.
Stale issues rot after an additional 30 days of inactivity and eventually close.
If this issue is safe to close now please do so by adding the comment /close.

Send feedback to Knative Productivity Slack channel or file an issue in knative/test-infra.

/lifecycle stale

/lifecycle frozen

Hhey @ahmetb!

@bsideup wrote this article on how to create custom domains per Service: https://bsideup.github.io/posts/knative_custom_domains/

I'm thinking about documenting this process in the docs.

What do you think?

@jonatasbaldin funny thing - I thought about contributing it to the docs but didn't find time yet :D

I was thinking about doing it this week, but if you do it first - feel free to! 馃憤

hey, just made the docs! would love a review from you @bsideup

I don鈥檛 think that blog post quite explains my need. I am looking to map example.com to a ksvc. To do that, I guess you need to drop {{.Name}} because I don鈥檛 care about ksvc鈥檚 name in my domain?

@ahmetb you can use the same approach as described in the blog post, just instead of using $subdomain.{{.Domain}} (where $subdomain is the label's value) you can replace it with just $domain

Something like:

apiVersion: v1
kind: ConfigMap
metadata:
  name: config-network
  namespace: knative-serving
data:
  domainTemplate: |-
    {{if index .Annotations "org.proj.domain" -}}
      {{- index .Annotations "org.proj.domain" -}}
    {{else if index .Annotations "org.proj.subdomain" -}}
      {{- index .Annotations "org.proj.subdomain" }}.{{.Domain-}}
    {{else -}}
      {{- .Name}}.{{.Namespace }}.{{.Domain-}}
    {{end -}}

I see. I think that鈥檚 the useful scenario docs should actually mention. 1:1 domain:ksvc mappings; not templates.

Was this page helpful?
0 / 5 - 0 ratings