Custom Domains

Dan Pastusek
Apr 26, 2019

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 rather than under the generated 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 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!

apiVersion: v1
kind: Service
# Name must be the same as in
# the Ambassador mapping below
name: nginx-http
annotations: |
apiVersion: ambassador/v1
kind: Mapping
name: nginx-http.namespace
prefix: "/"
service: http://nginx-http.namespace:8080
timeout_ms: 30000
use_websocket: true
- name: tcp
port: 8080
protocol: TCP
targetPort: 8080
app: nginx
type: ClusterIP

Stay in the loop!

Give us a shout on twitter or gitter, checkout some of our GitHub repos and be sure to join our mailing list!