Skip to main content
Version: 1.5

Automatic SSL Endpoints

Okteto Cloud can automatically create an SSL endpoint for your deployments. In order to take advantage of this feature, add the annotation below to your service's manifest:

  dev.okteto.com/auto-ingress: "true"

For example:

apiVersion: v1
kind: Service
metadata:
name: hello-world
labels:
app: hello-world
annotations:
dev.okteto.com/auto-ingress: "true"
spec:
type: ClusterIP
ports:
- port: 8080
protocol: TCP
targetPort: 8080
selector:
app: hello-world

A sample of how this should look is available here.

Adding this annotation will tell Okteto to automatically create an https ingress rule for you that redirects to the first http port of your service. NodePort or LoadBalancer services are managed as if they had this annotation too.

You can see the address of your endpoint by going to Okteto Cloud's UI. The endpoint address will be consistent across redeploys, as long as you don't change your service name.

Bring your own ingress

You can also use your own ingress manifests. This is useful when you have more complex configurations, or you need specific URLs.

Keep in mind that all the hosts you use in your ingress must end with-$NAMESPACE.cloud.okteto.net.

Let Okteto generate the host

Okteto Cloud can automatically inject the right host names during the creation of your ingresses, while leaving the rest of the configuration intact. In order to take advantage of this feature, add the annotation below to your ingress' manifest.

  dev.okteto.com/generate-host: "true"

Full example:

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
annotations:
dev.okteto.com/generate-host: "true"
name: hello-world
spec:
rules:
- http:
paths:
- backend:
serviceName: hello-world
servicePort: 8080
path: /

We recommend you follow this option. This way your ingress configuration can be deployed on any Okteto Cloud namespace.