We're excited to announce support for custom domains on KubeSail! What this means is you can now expose your running containers under your own hostname, such as
example.com rather than under the generated
kubesail.io hostname. You can add as many domains as you'd like, even on the free tier!
To do this, you'll first need to verify your domain in the dashboard.
Exposing via the UI
Once verified, you'll find the domain you just added as an option when you click the Expose to Internet (HTTPS) button within the Ports tab of your DeploymentIn Kubernetes, a Deployment is an object which describes how an application is deployed. A Deployment defines the images to launch, how to configure them, and how they should be deployedRead More.... You may expose any subdomain of the domain you verified, so in the example below, we will expose
api.stuffbydan.com even though we've only needed to verify the root domain,
Exposing via kubectl
KubeSail currently uses Ambassador which allows you to create standard Kubernetes ServicesA Service describes how to access your applications over the networkRead More... to route traffic based on hostname. To do this, you'll need to add an ambassador annotation to the ServiceA Service describes how to access your applications over the networkRead More...'s metadata, as seen in the below example. Simply modify the yaml to suit your deployment and hostname, and apply!