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 Deployment. 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 supports standard Services and Ingress objects, which allow you to route external traffic to your app based on hostname. Simply modify the yaml files below to suit your deployment and hostname, and apply!
apiVersion: v1 kind: Service metadata: name: my-app-service spec: ports: - name: tcp port: 8080 protocol: TCP targetPort: 8080 selector: app: my-app-label type: ClusterIP
apiVersion: networking.k8s.io/v1beta1 kind: Ingress metadata: name: my-app-ingress spec: rules: - host: api.stuffbydan.com http: paths: - backend: serviceName: my-app-service servicePort: 8080 tls: - hosts: - api.stuffbydan.com secretName: my-app-tls