By default, an application deployed in Okteto Cloud will be available at its Okteto Cloud domain, which has the form
For example, an application called
hello deployed in the namespace
cindylopez will be available at
To make your applications available on a non-Okteto Cloud domain (for example:
myapp.com), you can add a custom domain to your Okteto Cloud namespace.
This feature is part of the Okteto Developer Pro plan. If you haven't tried it yet, you can start your 14-day free trial here.
Applications that use custom domains will automatically get issued a valid certificate, just like regular Okteto Cloud endpoints.
Okteto does not provide a domain registration service (for registering a custom domain name) or a DNS provider service.
Add a Custom Domain Name to your Application.
You need to perform the following tasks to register your custom domain in your Okteto Cloud account:
Confirm that you own the custom domain name. You can buy a custom domain name with a domain registration service.
Register your custom domain with Okteto Cloud. You can do this by emailing us. Please include the domain, your github ID and the namespace you want to use in the email.
Update your DNS configuration so your custom domains points to Okteto Cloud's DNS target.
Configure your Application to use your Custom Domain
Once your domain has been registered with your Okteto Cloud account, it's time to put it to use.
For example, if your application's endpoint was
https://hello-cindylopez.cloud.okteto.net and you added the custom domain
myapp.com, after redeployment your application's endpoint will be
Using your Root Domain
If you want to make your application available in the root domain you provided, you'll need to make a small change to your manifests.
If you are using Okteto Cloud's auto-ingress features, you'll need to change the value of the
dev.okteto.com/auto-ingress annotation in your service to the word
domain, as shown below:
apiVersion: v1kind: Servicemetadata:name: hello-serviceannotations:dev.okteto.com/auto-ingress: "domain"spec:type: ClusterIPports:- name: "hello-world"port: 8080selector:app: hello-world
If you are creating your own ingress, you'll need to change the value of the
dev.okteto.com/generate-host annotation in your ingress to the word
domain, as shown below:
apiVersion: extensions/v1beta1kind: Ingressmetadata:name: hello-ingressannotations:dev.okteto.com/generate-host: "domain"spec:rules:- http:paths:- backend:serviceName: hello-worldservicePort: 8080
Okteto will automatically generate the correct host at deploy time. For example, if you added the custom domain
myapp.com to your namespace, the ingress will be created with
myapp.com as the host.
$ kubectl get ingress custom-dns
NAME HOSTS ADDRESS PORTS AGEcustom-dns myapp.com 126.96.36.199,188.8.131.52,184.108.40.206,220.127.116.11 80, 443 169m
We recommend you use this approach instead of hard-coding the host name in your manifests to keep them portable across namespaces.
Configure your DNS
In order to use your custom domain in Okteto, you'll need to point your custom DNS to
You usually configure a
CNAME record with your DNS provider to point to do it. We recommend you add a wildcard entry so you don't need to create an entry for every service deployed:
Consult your DNS provider’s documentation for specific instructions on creating CNAME records.
You can confirm that your DNS is configured correctly with the
host command, assuming your DNS changes have propagated:
$ host hello.myapp.com
hello.myapp.com is an alias for cindylopez.cloud.okteto.net.cindylopez.cloud.okteto.net has address ...