This topic tells you how to create and manage domain bindings, which associate a Space with a domain in Tanzu Platform for Kubernetes. For more information about how domain bindings interact with other ingress resources, see About Network Ingress.
Configure the basic information for the domain binding as follows:
Field | Instructions |
---|---|
Name | Enter a descriptive name for this binding |
Domain | Choose from the available domains in your Project |
Subdomain | Select Auto-assign to automatically generate a subdomain based on the domain chosen. If you do not configure a subdomain, the binding is set to the exact FQDN of the domain object. |
Port | Specify a port to be exposed with this domain, or select Auto-assign for a port to be automatically assigned |
(Optional) Configure the advanced settings:
Field | Instructions |
---|---|
Connection | Specify the type of traffic you want the DomainBinding to support. The options are HTTP or TCP. HTTPS is included in the HTTP option. |
EntryPoint | Specify an EntryPoint name. Routes use this to select this DomainBinding . If omitted, the platform defaults to main . |
DomainBinding
resource:
Set your Project context by running:
tanzu project use PROJECT-NAME
Where PROJECT-NAME
is the name of the Project you want ot use.
Create a DomainBinding
by running:
tanzu domain-binding create DOMAIN-BINDING-NAME FLAGS
Where:
DOMAIN-BINDING-NAME
is the name you want for your DomainBinding
.FLAGS
are the flags to configure domain, port, and entry point. For a complete list of the flags you can use, see tanzu domain-binding in the Tanzu CLI Documentation.For example, to create a DomainBinding
from the domain dev.corp.com
and request both a subdomain and a port to be automatically assigned:
$ tanzu domain-binding create test --auto-assign-subdomain-of dev.corp.com --auto-assign-port
DomainBinding busy-goose.dev.corp.com created
To use the Tanzu CLI to delete an existing DomainBinding
resource:
Set your Project context by running:
tanzu project use PROJECT-NAME
Where PROJECT-NAME
is the name of the Project you want ot use.
Delete the DomainBinding
by running:
tanzu domain-binding delete DOMAIN-BINDING-NAME
Where DOMAIN-BINDING-NAME
is the name of the DomainBinding
you want to delete.
For example:
$ tanzu domain-binding delete test
DomainBinding test deleted