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.

Create a domain binding

Tanzu Platform hub
To create a domain binding using the Tanzu Platform hub:
  1. In Tanzu Platform hub, navigate to Application Spaces > Spaces.
  2. Select the Space in which you want to create the domain binding.
  3. Navigate to the Ingress tab. You will see one or more domain bindings cards.
  4. Click Create Domain Binding.
  5. 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
  6. (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.
Tanzu CLI
To use the Tanzu CLI to create a new DomainBinding resource:
  1. Set your Project context by running:

    tanzu project use PROJECT-NAME
    

    Where PROJECT-NAME is the name of the Project you want ot use.

  2. 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
    

Delete a domain binding

To use the Tanzu CLI to delete an existing DomainBinding resource:

  1. Set your Project context by running:

    tanzu project use PROJECT-NAME
    

    Where PROJECT-NAME is the name of the Project you want ot use.

  2. 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
    
check-circle-line exclamation-circle-line close-line
Scroll to top icon